Yanor.net/
Wiki
Blog
GitHub
Sandbox
開始行:
* 起動rcスクリプト [#f3664f5c]
#!/bin/bash
# chkconfig: 345 99 15
# description: sample app
PATH=/home/taro/bin:$PATH
start() {
cd /home/taro
su taro -c "bin/myserver >/dev/null 2>&1 &"
}
stop() {
killall myserver
}
case "$1" in
start)
start
;;
stop)
killall myserver
;;
restart)
stop
sleep 1
start
;;
*)
echo USAGE: "$0 {start|stop|restart}"
exit 1
esac
終了行:
* 起動rcスクリプト [#f3664f5c]
#!/bin/bash
# chkconfig: 345 99 15
# description: sample app
PATH=/home/taro/bin:$PATH
start() {
cd /home/taro
su taro -c "bin/myserver >/dev/null 2>&1 &"
}
stop() {
killall myserver
}
case "$1" in
start)
start
;;
stop)
killall myserver
;;
restart)
stop
sleep 1
start
;;
*)
echo USAGE: "$0 {start|stop|restart}"
exit 1
esac
ページ名: