1 .创建
/etc/rc.d/init.d
#! /bin/bash
# chkconfig: 2345 10 90
#开始功能
开始()。
echo '===tian startService==='
第二层
}
#停止功能
停止()。
echo '===tian stopService==='
}
#停止功能
status () )。
echo '===tian status Service==='
}
case '$1' in
开始)
开始
;
停止)
停止
;
重新加载)
停止
开始
;
斯塔茨)
status $SNAME
;
echo $ ' usage : $0{开始}
exit 1
欧洲联盟
2 .注册
chkconfig--添加田
3 .开机启动
chkconfig --level 35 tian on
3 .验证
===tian stopService===
===tian startService===
===tian status Service===