简单的启动init脚本模版

#!/bin/sh
#
# Prometheus Start Script
#
# chkconfig: 235 80 70
# description:  Starts, stops prometheus
#
#
### BEGIN INIT INFO
# Provides: Prometheus 
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 5
# Default-Stop: 0 1 4 6
# Short-Description: start and stop 
# Description: Start, stop 
### END INIT INFO
case "$1" in 
start)
        echo "Creating $TOUCHFILE"
;;
stop)
        echo "Removing $TOUCHFILE"
;;
restart)
        echo "Recreating $TOUCHFILE"
;;
reload)
        echo "Re-Touching $TOUCHFILE"
;;
 *)
        echo "Usage: touchfile.sh <start|stop|restart|reload>"
;;
esac
exit 0

猜你喜欢

转载自blog.csdn.net/sinat_29173167/article/details/81712781
今日推荐