Product
Tinker Board 3
[AIOT] Set a Script from Startup in Debian for Tinker Board 3
- For Debian OS
Sample setting for starting up the applications when into Debian
This is a sample to print logs into dmesg, to set the applications will automatically run when into the Debian system.
1. Create tb3_start.sh or copy tb3_start.sh file into /usr/local/bin/ folder
root@linaro-alip:/# vi /usr/local/bin/tb3_start.sh
#!/bin/bash
echo "tinker board 3 start up !!" > /dev/kmsg
2. Setting the permission
root@linaro-alip:/# chmod a+x /usr/local/bin/tb3_start.sh
3. Create tb3-start.service or copy tb3-start.service into /lib/systemd/system/ folder
root@linaro-alip:/# sudo vi /lib/systemd/system/tb3-start.service
[Unit]
Description=Tinker Board 3 Start up Service
[Service]
Type=simple
WorkingDirectory=/usr/local/bin
ExecStart=/bin/bash /usr/local/bin/tb3_start.sh
[Install]
WantedBy=multi-user.target
4. Execute below command to enable service
systemctl enable tb3-start.service
5. Reboot the Debian system and the message “tinker board 3 start up !!” will be shown on dmesg.