How to run a shell script at startup

前端 未结 21 1794
伪装坚强ぢ
伪装坚强ぢ 2020-11-22 13:39

On an Amazon S3 Linux instance, I have two scripts called start_my_app and stop_my_app which start and stop forever (which in turn runs my

21条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-22 14:02

    You can do it :

    chmod +x PATH_TO_YOUR_SCRIPT/start_my_app 
    

    then use this command

    update-rc.d start_my_app defaults 100
    

    Please see this page on Cyberciti.

提交回复
热议问题