登录站点

用户名

密码

注册

查看日志|返回日志列表

linux 如何开机自动运行sh脚本

标签linux  如何  2017-03-11 21:17

    开机运行只需将它加入到 rc.local

   一般为/etc/rc.d/rc.local 

    在其中加入以下行:

    sh /path/test.sh


    后台运行:  nohup sh /home/test.sh &

   /usr/bin/rsync --daemon --config=/etc/rsyncd.conf  #同步  




分享 949 次阅读 | 0 个评论

留下脚印

评论