PHP-FPM's startup script

Source: Internet
Author: User

[Email protected] init.d]# Morephp-FPMD #!/bin/bash-# #php-fpm-this script starts and stops the php-FPM daemin########################################################## ##  -  theRepresents the default row number for S and K. Start Sequence Number ( -); Turn off the sequence number 15 # # 3 for the RunLevel, if all the default levels do not start, use"-"represents # # # ############################################## ########### #chkconfig:3  -  the#description: Php-FPMD is phpfastcgi manager,only forphp# #processname:p hp-Fpm#config:/usr/local/php/etc/php-Fpm.conf#pidfile:/usr/local/php/var/run/php-Fpm.pid#logfile:/usr/local/php/var/log/php-Fpm.log#sourcefunctionLibrary.". /"-run the file./etc/rc.d/init.d/functions#source networking configuration./etc/sysconfig/Network#check that networking are up. [ "$NETWORKING"="No"] && exit0PHPFPM="/USR/LOCAL/PHP/SBIN/PHP-FPM"Prog=$(basename$phpfpm) Php_fpm_config="/usr/local/php/etc/php-fpm.conf"Lockfile=/var/lock/subsys/Phpfpmstart () {[-X $PHPFPM] | | Exit5    [ -F $php _fpm_config]| | Exit6     Echo-N $"starting $prog:"Daemon $phpfpm-c $php _fpm_config retval=$?Echo[$retval-eq0] &&Touch$Lockfilereturn $retval}stop () {Echo-N $"stopping $prog:"Killproc $prog-QUIT retval=$?Echo[$retval-eq0] &&RM-F $Lockfilereturn $retval}restart () {configtest|| Return $?Stop Start}reload () {configtest|| Return $?Echo-N $"Reloading $prog:"Killproc $phpfpm-HUP RETVAL=$?Echo}force_reload () {restart}configtest () {$phpfpm-T-C $php _fpm_config}rh_status () {status $prog}rh_status_q () {rh_status>/dev/NULL 2>&1} Case " $" inchstart) Rh_status_q&& exit0        $1        ;; Stop) Rh_status_q|| Exit0        $1        ;; Restart|configtest) $1        ;; Reload) Rh_status_q|| Exit7        $1        ;; Force-reload) force_reload;;    status) Rh_status;; Condrestart|try-restart) rh_status_q|| Exit0            ;; *)        Echo$"Usage: $ {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}"Exit2Esac

PHP-FPM's startup script

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.