X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=php-fpm.init;fp=php-fpm.init;h=0000000000000000000000000000000000000000;hb=72ad6add086b462795ce6d3a9a6ca5f8d8410b03;hp=125922be2c5d652452f96586ecfdf1c2a0657243;hpb=ad5f98910c721925df50d505bbf45b82b90eaf38;p=packages%2Fphp.git diff --git a/php-fpm.init b/php-fpm.init deleted file mode 100644 index 125922b..0000000 --- a/php-fpm.init +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/sh -# -# php-fpm PHP FastCGI Process Manager -# -# chkconfig: 345 80 30 -# -# description: PHP FastCGI Process Manager -# -# processname: php-fpm -# config: /etc/php/php-fpm.conf -# pidfile: /var/run/@processname@.pid -# - -# Source function library -. /etc/rc.d/init.d/functions - -# Get network config -. /etc/sysconfig/network - -configfile=/etc/php/php-fpm.conf -lockfile=/var/lock/subsys/@processname@ -pidfile=$(sed -ne 's,^pid\s*=\s*\(.*\),\1,p' $configfile) -pidfile=${pidfile:-/var/run/@processname@.pid} - -start() { - # Check if the service is already running? - if [ -f $lockfile ]; then - msg_already_running "PHP FastCGI Process Manager" - return - fi - - msg_starting "PHP FastCGI Process Manager (@processname@)" - daemon --pidfile $pidfile /usr/sbin/@processname@ --fpm-config $configfile - RETVAL=$? - [ $RETVAL -eq 0 ] && touch $lockfile -} - -stop() { - if [ ! -f $lockfile ]; then - msg_not_running "PHP FastCGI Process Manager" - return - fi - - # Stop daemons. - msg_stopping "PHP FastCGI Process Manager" - # always gracefully shut down php-fpm - /sbin/start-stop-daemon -q --stop -s QUIT --retry QUIT/600/TERM/10 --pidfile $pidfile - [ "$?" -eq 0 ] && ok || fail - rm -f $lockfile -} - -reload() { - local sig=${1:-HUP} - local retnr=${2:-7} - if [ ! -f $lockfile ]; then - msg_not_running "PHP FastCGI Process Manager" - RETVAL=$retnr - return - fi - - msg_reloading "PHP FastCGI Process Manager" - killproc --pidfile $pidfile php-fpm -$sig - RETVAL=$? -} - -condrestart() { - if [ ! -f $lockfile ]; then - msg_not_running "PHP FastCGI Process Manager" - RETVAL=$1 - return - fi - - stop - start -} - -RETVAL=0 -# See how we were called. -case "$1" in - start) - start - ;; - stop|quit) - stop - ;; - restart) - stop - start - ;; - try-restart) - condrestart 0 - ;; - reload|force-reload) - reload USR2 7 - ;; - flush-logs|logrotate) - reload USR1 0 - ;; - status) - status --pidfile $pidfile @processname@ - RETVAL=$? - ;; - *) - msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|flush-logs|status}" - exit 3 - ;; -esac - -exit $RETVAL