Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1283424
  • 博文数量: 554
  • 博客积分: 10425
  • 博客等级: 上将
  • 技术积分: 7555
  • 用 户 组: 普通用户
  • 注册时间: 2006-11-09 09:49
文章分类

全部博文(554)

文章存档

2012年(1)

2011年(1)

2009年(8)

2008年(544)

分类:

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

 

以上文章转自于 :

阅读(501) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~