Execute Demo At Boot Time - ICP DAS USA ALX-9000 Series User Manual

Table of Contents

Advertisement

4.1.3. Execute Demo at Boot Time

User can refer to below steps to auto-execute demo "helloworld" at boot time in ALX-9000.
1. Create script file in "/etc/init.d"
User can use "vim" command to create the script file in "/etc/init.d" and add below script
language to the file.
root@icpdas:~#
#! /bin/bash
/root/LinPAC_SDK/examples/lx-8k_9k/common/helloworld >
/tmp/test.log
Please refer to your own path for executing the helloworld demo.
2. Create service file in "/lib/systemd/system".
root@icpdas:~#
[Unit]
Description=Icpdas init routine
After=syslog.target
[Service]
ExecStart=/bin/sh /etc/init.d/helloworld
Type=oneshot
[Install]
WantedBy=multi-user.target
ALX-9000 (Linux based PAC) User Manual
Copyright © 2024 ICP DAS Co., Ltd. All Rights Reserved.
vim /etc/init.d/helloworld
vim /lib/systemd/system/helloworld.service
version 1.0.0
E-mail: service@icpdas.com
Page: 72

Advertisement

Table of Contents
loading

This manual is also suitable for:

Alx-9191Alx-9391Alx-9791

Table of Contents