|
ls -la /home/root/
|
|
--Result
|
|
root@mityomapl138:~# ls -la /home/root/
|
|
drwxr-sr-x 2 root root 0 Jan 1 00:06 .
|
|
drwxr-sr-x 3 root root 0 Jan 1 1970 ..
|
|
-rw------- 1 root root 19 Jan 1 00:06 .ash_history
|
|
-rwxr-x--- 1 root root 520558 Jan 1 1970 DigitalDemodulatorARM
|
|
-rwxr-x--- 1 root root 784181 Jan 1 1970 DigitalDemodulatorDSP.out
|
|
-rw-r--r-- 1 root root 0 Jan 1 00:00 results.dat
|
|
-rwxr-xr-x 1 root root 112 Jan 1 1970 start_application.sh
|
|
|
|
|
|
ls -la /etc/systemd/system/*
|
|
|
|
--Result
|
|
root@mityomapl138:~# ls -la /etc/systemd/system/*
|
|
-rw-rw-r-- 1 1001 root 202 Jan 1 1970 /etc/systemd/system/AutoRun.service
|
|
lrwxrwxrwx 1 root root 40 Jan 1 00:00 /etc/systemd/system/dbus-org.freedesktop.Avahi.service -> /lib/systemd/system/avahi-daemon.service
|
|
|
|
/etc/systemd/system/basic.target.wants:
|
|
drwxr-sr-x 2 root root 0 Jan 1 1970 .
|
|
drwxrwsrwx 8 root root 0 Jan 1 00:00 ..
|
|
lrwxrwxrwx 1 root root 37 Jan 1 1970 timestamp.service -> /lib/systemd/system/timestamp.service
|
|
|
|
/etc/systemd/system/getty.target.wants:
|
|
drwx--S--- 2 root root 0 Jan 1 1970 .
|
|
drwxrwsrwx 8 root root 0 Jan 1 00:00 ..
|
|
lrwxrwxrwx 1 root root 34 Jan 1 1970 getty@tty1.service -> /lib/systemd/system/getty@.service
|
|
lrwxrwxrwx 1 root root 41 Jan 1 1970 serial-getty@ttyS1.service -> /lib/systemd/system/serial-getty@.service
|
|
|
|
/etc/systemd/system/local-fs.target.wants:
|
|
drwxr-sr-x 2 root root 0 Jan 1 1970 .
|
|
drwxrwsrwx 8 root root 0 Jan 1 00:00 ..
|
|
|
|
/etc/systemd/system/multi-user.target.wants:
|
|
drwxr-sr-x 2 root root 0 Jan 1 00:00 .
|
|
drwxrwsrwx 8 root root 0 Jan 1 00:00 ..
|
|
lrwxrwxrwx 1 root root 35 Jan 1 1970 AutoRun.service -> /etc/systemd/system/AutoRun.service
|
|
lrwxrwxrwx 1 root root 40 Jan 1 00:00 avahi-daemon.service -> /lib/systemd/system/avahi-daemon.service
|
|
lrwxrwxrwx 1 root root 39 Jan 1 1970 dropbearkey.service -> /lib/systemd/system/dropbearkey.service
|
|
lrwxrwxrwx 1 root root 36 Jan 1 1970 remote-fs.target -> /lib/systemd/system/remote-fs.target
|
|
|
|
/etc/systemd/system/sockets.target.wants:
|
|
drwxr-sr-x 2 root root 0 Jan 1 00:00 .
|
|
drwxrwsrwx 8 root root 0 Jan 1 00:00 ..
|
|
lrwxrwxrwx 1 root root 39 Jan 1 00:00 avahi-daemon.socket -> /lib/systemd/system/avahi-daemon.socket
|
|
lrwxrwxrwx 1 root root 35 Jan 1 1970 dropbear.socket -> /lib/systemd/system/dropbear.socket
|
|
|
|
/etc/systemd/system/sysinit.target.wants:
|
|
drwxr-sr-x 2 root root 0 Jan 1 1970 .
|
|
drwxrwsrwx 8 root root 0 Jan 1 00:00 ..
|
|
|
|
|
|
# Test your service
|
|
|
|
systemctl start AutoRun.service
|
|
--Result
|
|
root@mityomapl138:~# systemctl start AutoRun.service
|
|
No response
|
|
|
|
systemctl status AutoRun.service
|
|
--Result
|
|
root@mityomapl138:~# systemctl status AutoRun.service
|
|
AutoRun.service - Application run
|
|
Loaded: loaded (/etc/systemd/system/AutoRun.service; enabled)
|
|
Active: active (running) since Sat, 01 Jan 2000 00:00:23 +0000; 9min ago
|
|
Main PID: 1327 (start_applicati)
|
|
CGroup: name=systemd:/system/AutoRun.service
|
|
├ 1327 /bin/sh /home/root/start_application.sh
|
|
└ 1577 ./DigitalDemodulatorARM DigitalDemodulatorDSP.out
|
|
|
|
root@mityomapl138:~# systemctl status AutoRun.service
|
|
AutoRun.service - Application run
|
|
Loaded: loaded (/etc/systemd/system/AutoRun.service; enabled)
|
|
Active: active (running) since Sat, 01 Jan 2000 00:00:23 +0000; 10min ago
|
|
Main PID: 1327 (start_applicati)
|
|
CGroup: name=systemd:/system/AutoRun.service
|
|
├ 1327 /bin/sh /home/root/start_application.sh
|
|
└ 1577 ./DigitalDemodulatorARM DigitalDemodulatorDSP.out
|
|
|
|
# The status command should report that the service is running.
|
|
# And enable the service so it starts on boot
|
|
systemctl enable AutoRun.service
|
|
--Result
|
|
No response
|