Linuxサービスデーモン

Linuxサービスデーモンの登録には、以下が必要
シェルに、、以下が必要!
#!/bin/bash
#
# chkconfig: - 80 15
# description: xxxxxxx
#
# Source function library.
. /etc/rc.d/init.d/functions


そしていかのオペレーションが必要

chkconfig --add xxxxd
chkconfig xxxxd on


結局、シェルはこんな感じ

#!/bin/bash
#
# chkconfig: - 80 15
# description: xxxxxxx
#
# Source function library.
. /etc/rc.d/init.d/functions

case "$1" in
start)
su - uranus -c /home/uranus/startSample.sh"
;;
stop)
su - uranus -c /home/uranus/stopSample.sh"
;;
*)
echo $"Usage: $0 {start|stop}"
exit 1
esac

exit $RETVAL