CodeCraft tips
[
ホーム
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
UNIX/daemontools
をテンプレートにして作成
開始行:
* UNIX/daemontools [#vdb28d72]
** /etc/init.d/svscan(起動スクリプト) [#l4024e04]
#!/bin/sh
#
# svscan Start svscan.
#
# Author: TAKIZAWA Takashi <taki@cyber.email.ne.jp>
#
# chkconfig: 345 99 50
# description: svscan starts and monitors a collection ...
# see http://cr.yp.to/daemontools.html
# processname: svscan
# service directory: /service
# Source function library.
. /etc/rc.d/init.d/functions
PATH="/usr/local/bin:$PATH"
prog=svscan
SVDIR=/service
RETVAL=0
export PATH SVDIR
start() {
echo -n $"Starting $prog: "
daemon svscan $SVDIR &
RETVAL=$?
echo_success
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/svscan
}
stop() {
echo -n $"Stopping $prog: "
killproc svscan
RETVAL=$?
(cd $SVDIR && svc -dx $SVDIR/*)
(cd $SVDIR && svc -dx $SVDIR/*/log)
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/svscan
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status svscan
RETVAL=$?
;;
restart|reload)
stop
start
;;
*)
echo $"Usage: $prog {start|stop|status|restart|reload}"
exit 1
esac
exit $RETVAL
~
** 関連ページ [#qdc3d88c]
-[[DJB Tools Tips>http://www.bravotouring.com/~yano/compu...
~
終了行:
* UNIX/daemontools [#vdb28d72]
** /etc/init.d/svscan(起動スクリプト) [#l4024e04]
#!/bin/sh
#
# svscan Start svscan.
#
# Author: TAKIZAWA Takashi <taki@cyber.email.ne.jp>
#
# chkconfig: 345 99 50
# description: svscan starts and monitors a collection ...
# see http://cr.yp.to/daemontools.html
# processname: svscan
# service directory: /service
# Source function library.
. /etc/rc.d/init.d/functions
PATH="/usr/local/bin:$PATH"
prog=svscan
SVDIR=/service
RETVAL=0
export PATH SVDIR
start() {
echo -n $"Starting $prog: "
daemon svscan $SVDIR &
RETVAL=$?
echo_success
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/svscan
}
stop() {
echo -n $"Stopping $prog: "
killproc svscan
RETVAL=$?
(cd $SVDIR && svc -dx $SVDIR/*)
(cd $SVDIR && svc -dx $SVDIR/*/log)
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/svscan
}
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status svscan
RETVAL=$?
;;
restart|reload)
stop
start
;;
*)
echo $"Usage: $prog {start|stop|status|restart|reload}"
exit 1
esac
exit $RETVAL
~
** 関連ページ [#qdc3d88c]
-[[DJB Tools Tips>http://www.bravotouring.com/~yano/compu...
~
ページ名:
TrackBack(0)
|
外部リンク元
検索
サイト内
Web
最新の20件
2010-03-09
Software/Eclipse/3.4.x
2009-08-04
Ubuntu
Ubuntu/7.04 feisty
Ubuntu/8.04 hardy/システム環境設定
Ubuntu/8.04 hardy
2009-07-06
Linux/misc
2009-05-16
Debian GNU Linux/5.0 lenny/amd64/iceweasel
2009-05-03
Debian GNU Linux/5.0 lenny/システム環境設定
2009-03-22
Debian GNU Linux
Software/Eclipse/3.1.x
Software/Eclipse/3.2.x
Software/Eclipse
Debian GNU Linux/5.0 lenny
2008-08-12
UNIX/sendmail
UNIX/Subversion
2008-08-05
UNIX/proftpd
2008-08-01
UNIX
2008-05-13
UNIX/samba
2008-05-12
Debian GNU Linux/5.0 lenny/ユーザー環境設定
2008-04-15
Windows