现在的位置: 首页 > 综合 > 正文

redhat linux的自启动脚本

2013年10月11日 ⁄ 综合 ⁄ 共 280字 ⁄ 字号 评论关闭
/etc/rc.d/init.d下的脚本,需要a+x权限
#!/bin/sh
#
# ident "@(#)mipagent 1.1 99/11/06 SMI"
#
# Copyright (c) 1999 by Sun Microsystems, Inc.
# All rights reserved.
#

case "$1" in
'start')
cd /www
python index.py 80&
;;
'stop')
pkill -x -u 0 -P 1 python index.py
;;
*)
echo "Usage: $0 { start | stop }"
exit 1
;;
esac
exit 0

然后在/etc/rc.d/rc3.d下建立连接即可

抱歉!评论已关闭.