daemon
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
-[[シェルスクリプトをdaemon化する方法:http://itkobo-z.jp/...
-[[Supervisorで簡単にデーモン化:http://qiita.com/yushin/i...
*start-stop-daemon [#u3829d4f]
-[[start-stop-daemonいじってみた:https://freedom-man.com/...
-[[Man page of start-stop-daemon:http://jnug.net/po4a/mon...
-[[init.d スクリプトを書こう:http://surf.ml.seikei.ac.jp/...
**入手 [#a3e45e9e]
-[[Using start-stop-daemon on CentOS:http://blog.starckli...
-[[dpkg_1.17.6.tar.xz:https://www.google.co.jp/url?sa=t&r...
$ tar -xf dpkg_1.17.6.tar.xz
$ cd dpkg-1.17.6
$ sudo yum install ncurses-devel ncurses
$ ./configure
$ make
$ cd utils
$ sudo cp start-stop-daemon /usr/local/bin
**使用 [#df369c17]
#!/bin/bash
DAEMON=/usr/bin/python
PIDFILE=/home/xxx/hoge.pid
DAEMON_ARGS=/home/xxx/hoge.py
case "$1" in
"start")
start-stop-daemon --start --quiet --background --mak...
result=$?
if [ $result != "0" ]
then
pid=`cat $PIDFILE`
echo "daemon is already running. (pid=${pid})"
exit 1
fi
;;
"stop")
start-stop-daemon --stop --quiet --pidfile $PIDFILE
result=$?
if [ $result != "0" ]
then
echo "daemon is not running. (check $PIDFILE)."
exit 1
fi
rm -f $PIDFILE
;;
esac
終了行:
-[[シェルスクリプトをdaemon化する方法:http://itkobo-z.jp/...
-[[Supervisorで簡単にデーモン化:http://qiita.com/yushin/i...
*start-stop-daemon [#u3829d4f]
-[[start-stop-daemonいじってみた:https://freedom-man.com/...
-[[Man page of start-stop-daemon:http://jnug.net/po4a/mon...
-[[init.d スクリプトを書こう:http://surf.ml.seikei.ac.jp/...
**入手 [#a3e45e9e]
-[[Using start-stop-daemon on CentOS:http://blog.starckli...
-[[dpkg_1.17.6.tar.xz:https://www.google.co.jp/url?sa=t&r...
$ tar -xf dpkg_1.17.6.tar.xz
$ cd dpkg-1.17.6
$ sudo yum install ncurses-devel ncurses
$ ./configure
$ make
$ cd utils
$ sudo cp start-stop-daemon /usr/local/bin
**使用 [#df369c17]
#!/bin/bash
DAEMON=/usr/bin/python
PIDFILE=/home/xxx/hoge.pid
DAEMON_ARGS=/home/xxx/hoge.py
case "$1" in
"start")
start-stop-daemon --start --quiet --background --mak...
result=$?
if [ $result != "0" ]
then
pid=`cat $PIDFILE`
echo "daemon is already running. (pid=${pid})"
exit 1
fi
;;
"stop")
start-stop-daemon --stop --quiet --pidfile $PIDFILE
result=$?
if [ $result != "0" ]
then
echo "daemon is not running. (check $PIDFILE)."
exit 1
fi
rm -f $PIDFILE
;;
esac
ページ名: