summaryrefslogtreecommitdiffstats
path: root/abs/core/php/rc.d.php-fpm
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2014-04-16 00:03:59 (GMT)
committerBritney Fransen <brfransen@gmail.com>2014-04-16 00:03:59 (GMT)
commitb90e9ef668828634480e31a3286b7e626b8a7bd1 (patch)
treee1d958d05f05334d4064af6eeea61ebb3d4b6a2d /abs/core/php/rc.d.php-fpm
parent237df8ca287f8109dad86a73072853fd8d7670ff (diff)
downloadlinhes_pkgbuild-b90e9ef668828634480e31a3286b7e626b8a7bd1.zip
linhes_pkgbuild-b90e9ef668828634480e31a3286b7e626b8a7bd1.tar.gz
linhes_pkgbuild-b90e9ef668828634480e31a3286b7e626b8a7bd1.tar.bz2
php: update to 5.5.11. refs #961
Diffstat (limited to 'abs/core/php/rc.d.php-fpm')
-rw-r--r--abs/core/php/rc.d.php-fpm144
1 files changed, 0 insertions, 144 deletions
diff --git a/abs/core/php/rc.d.php-fpm b/abs/core/php/rc.d.php-fpm
deleted file mode 100644
index a8cb9ec..0000000
--- a/abs/core/php/rc.d.php-fpm
+++ /dev/null
@@ -1,144 +0,0 @@
-#!/bin/bash
-
-. /etc/rc.conf
-. /etc/rc.d/functions
-
-
-wait_for_pid () {
- try=0
- while test $try -lt 35 ; do
- case "$1" in
- 'created')
- if [ -f "$2" ] ; then
- try=''
- break
- fi
- ;;
- 'removed')
- if [ ! -f "$2" ] ; then
- try=''
- break
- fi
- ;;
- esac
-
- stat_append '.'
- try=`expr $try + 1`
- sleep 1
- done
-}
-
-test_config() {
- stat_busy 'Checking configuration'
- if [ $(id -u) -ne 0 ]; then
- stat_append '(This script must be run as root)'
- stat_die
- fi
-
- if [ ! -r /etc/php/php-fpm.conf ]; then
- stat_append '(/etc/php/php-fpm.conf not found)'
- stat_die
- fi
-
- local test=$(/usr/sbin/php-fpm -t 2>&1)
- if [ $? -gt 0 ]; then
- stat_append '(error in /etc/php/php-fpm.conf)'
- stat_die
- elif echo $test | grep -qi 'error'; then
- stat_append '(error in /etc/php/php.ini)'
- stat_die
- fi
-
- stat_done
-}
-
-case "$1" in
- start)
- test_config
- stat_busy 'Starting php-fpm'
-
- /usr/sbin/php-fpm --daemonize --pid /run/php-fpm/php-fpm.pid
-
- if [ "$?" != 0 ] ; then
- stat_fail
- exit 1
- fi
-
- wait_for_pid created /run/php-fpm/php-fpm.pid
-
- if [ -n "$try" ] ; then
- stat_fail
- exit 1
- else
- add_daemon php-fpm
- stat_done
- fi
- ;;
-
- stop)
- test_config
- stat_busy 'Gracefully shutting down php-fpm'
-
- if [ ! -r /run/php-fpm/php-fpm.pid ] ; then
- stat_fail
- exit 1
- fi
-
- kill -QUIT `cat /run/php-fpm/php-fpm.pid`
-
- wait_for_pid removed /run/php-fpm/php-fpm.pid
-
- if [ -n "$try" ] ; then
- stat_fail
- exit 1
- else
- rm_daemon php-fpm
- stat_done
- fi
- ;;
-
- force-quit)
- stat_busy 'Terminating php-fpm'
-
- if [ ! -r /run/php-fpm/php-fpm.pid ] ; then
- stat_fail
- exit 1
- fi
-
- kill -TERM `cat /run/php-fpm/php-fpm.pid`
-
- wait_for_pid removed /run/php-fpm/php-fpm.pid
-
- if [ -n "$try" ] ; then
- stat_fail
- exit 1
- else
- rm_daemon php-fpm
- stat_done
- fi
- ;;
-
- restart)
- $0 stop
- $0 start
- ;;
-
- reload)
- test_config
- stat_busy 'Reload service php-fpm'
-
- if [ ! -r /run/php-fpm/php-fpm.pid ] ; then
- stat_fail
- exit 1
- fi
-
- kill -USR2 `cat /run/php-fpm/php-fpm.pid`
- stat_done
- ;;
-
- *)
- echo "usage: $0 {start|stop|force-quit|restart|reload|logrotate}"
- exit 1
- ;;
-
-esac