您的位置:首页 > 运维架构 > Shell

linux chkconfig配置自启动shell

2015-12-03 19:05 603 查看
$vim /etc/init.d/temp2file_luncher.sh

#!/bin/bash
# chkconfig: 2345 66 36
# /usr/bin/python
#
case "$1" in
start)
echo -n "Start: "
su root -c "nohup python /home/pi/Running/temp2file.py &"
echo "Done."
;;
stop)
echo -n "Stop: "
killall -9 temp2file.py
echo "Done."
;;
*)
echo "Usage: python { start | stop  }"
exit 1
esac
exit 0


$chkconfig --add temp2file_luncher.sh
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: