分类:
2008-04-07 18:20:46
Try below steps, please modify the relative parts first.
1. Write a script /etc/init.d/myservice as below, and make it executable.
#!/bin/sh
mode=$1
case "$mode" in
'start')
if [ -d "your script file's location" ]
then
echo "Starting myservice"
your script file(*.sh) &
fi
;;
*)
echo " Usage: "
echo " $0 start (start myservice)"
exit 1
;;
esac
exit 0
2. Create a soft link to /etc/rc2.d/S99myservice.
ln -s /etc/init.d/myservice /etc/rc2.d/S99myservice
3. create a soft link to /etc/rc0.d/K99jrserver.
ln -s /etc/init.d/myservice /etc/rc0.d/K99myservice
以上文章转自于 :