PSS Standalone
/home/pss pss pss
├─ bin
│ ├─ bof_pss
│ ├─ eof_pss
│ └─ service_pss
└─ pss
Automatic Startup
[root@localhost ~]# cat /etc/rc.d/rc.local
#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.
touch /var/lock/subsys/local
########################################################################
su - pss -c "/home/pss/bin/service_pss"
########################################################################
[root@localhost ~]#
Daily Fixed Time Trigger
[root@localhost ~]# cat /etc/crontab
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# For details see man 4 crontabs
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
0 6 * * pss (/home/pss/bin/service_pss)
[root@localhost ~]#
System Service Enabled
[root@localhost ~]# systemctl start crond.service
[root@localhost ~]#
[root@localhost ~]# systemctl status crond.service
● crond.service - Command Scheduler
Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled)
Active: active (running) since 一 2021-10-18 10:55:12 CST; 6 months 20 days ago
Main PID: 1347 (crond)
CGroup: /system.slice/crond.service
└─1347 /usr/sbin/crond -n
5月 09 16:35:01 localhost.localdomain crond[1347]: (*system*) RELOAD (/etc/crontab)
5月 09 16:35:01 localhost.localdomain crond[1347]: (CRON) bad day-of-week (/etc/crontab)
5月 09 16:37:01 localhost.localdomain crond[1347]: (*system*) RELOAD (/etc/crontab)
5月 09 16:37:01 localhost.localdomain crond[1347]: (CRON) bad day-of-week (/etc/crontab)
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
[root@localhost ~]#
/home/pi>sudo cat /home/pi/.config/lxsession/LXDE-pi/autostart
####################################################
####chromium-browser http:
####################################################
sh /home/pi/startup.sh
|