Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
テストするために現在バックグラウンドで実行しているシェルスクリプト(bash)があります。コンピュータを起動した後、デーモンとして実行したいと思います。どうすればこれを達成できますか?コンピュータの電源が切れるまで実行されるため、すでに無限ループが発生しています。
スクリプトのフルパスを/etc/rc.localファイルのexit0行の前に配置します。
または、 内からスクリプトにソフト リンクすることもできます/etc/init.d。root権限で実行する必要があります。
/etc/init.d