首页 > 代码库 > linux autoload service create

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 $?

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

linux autoload service create