linux autoload service create

---恢复内容开始---

EXEC="php-fpm"

stop()
{
echo "Stoping $EXEC ..."
ps aux | grep "$EXEC" | kill -9 `awk '{print $2}'` >/dev/null 2>&1

usleep 100
echo "Shutting down $EXEC: [ OK ]"
}

start()
{
echo "Starting $EXEC ..."
/usr/local/php/sbin/php-fpm
usleep 100
echo "Starting $EXEC: [ OK ]"
}

restart()
{
stop
start
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;

esac

exit $?

---恢复内容结束---

上一篇:js保留小数点后N位的方法介绍


下一篇:js 的match方法