バックグラウンド起動シェルコマンド/スクリプトで実行するLinuxのUbuntu /ラズベリーパイ

免責事項:この記事はブロガーオリジナル記事です、続くBY-SAのCC 4.0を著作権契約、複製、元のソースのリンクと、この文を添付してください。
このリンク: https://blog.csdn.net/qq_25908839/article/details/94358716

[編集]#/etc/rc.localのファイル、終了0前にファイルを実行するコマンドを追加

# cat /etc/rc.local 
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
cd /root/caddy
./caddy &
exit 0

次の2つのコマンドは、それに追加されます

CD /ルート/キャディ
./caddy&

おすすめ

転載: blog.csdn.net/qq_25908839/article/details/94358716