1存放腳本位置 /etc/init.d/ServerManagerCLI.sh 該腳本是自己新建的內容參看2
增加執行權限 chmod +x /etc/rc.d/init.d/ServerManagerCLI.sh
cd /etc/init.d/
chkconfig --add ServerManagerCLI.sh
chkconfig ServerManagerCLI.sh on
chkconfig --list
2腳本內容
#!/bin/sh
#chkconfig: 2345 80 90
#descriptiong:auto ServerManagerCLI
#進入到指定目錄執行
cd /goldendsp/GoldenDSP_Linux_x64_3.0.10516.0
#要實現的啟動命令
./ServerManagerCLI -o
3 reboot 進行測試
ps -aux 查看是否有本次隨機啟動的進程
進程太多使用ps -aux|grep xxx --xxx為進程名稱