在一个 shell 脚本中执行另一个 shell 脚本的3种方法
1 | ./bar.sh fork |
编辑启动脚本 /etc/init.d/autorun.sh
脚本前三行如下:1
2
3
#chkconfig: 2345 80 90
#description:auto_run
开启自启动服务
1 | chkconfig --add autorun.sh |
关闭自启动服务
1 | chkconfig autorun.sh off |
查看自启动服务
1 | chkconfig --list |
autorun.sh 重启一些服务
1 |
|