答案1
把它放入/etc/rc.local
:
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
sh /path/to/script.sh start
或者在具有特殊激活参数的 cron 作业中:
crontab -e
@reboot /path/to/script.sh start