How to run a shell script at startup

前端 未结 21 2160
伪装坚强ぢ
伪装坚强ぢ 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:03

    • Add your script to /etc/init.d/ directory
    • Update your rc run-levels: $ update-rc.d myScript.sh defaults NN where NN is the order in which it should be executed. 99 for example will mean it would be run after 98 and before 100.

提交回复
热议问题