X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mjo-overlay.git;a=blobdiff_plain;f=dev-lang%2Fphp%2Ffiles%2Fphp-fpm-r4.init;fp=dev-lang%2Fphp%2Ffiles%2Fphp-fpm-r4.init;h=0000000000000000000000000000000000000000;hp=a186d83478c54341feb45e5f3f936b1ca200d013;hb=c8f916f066225037a9e3c7d85f5529ac3dce359d;hpb=3159f43d1af846567d1b5c6bec4fbbfa0e62b1bf diff --git a/dev-lang/php/files/php-fpm-r4.init b/dev-lang/php/files/php-fpm-r4.init deleted file mode 100755 index a186d83..0000000 --- a/dev-lang/php/files/php-fpm-r4.init +++ /dev/null @@ -1,47 +0,0 @@ -#!/sbin/runscript - -set_phpvars() { - PHPSLOT=${SVCNAME#php-fpm-} - [ ${PHPSLOT} = 'php-fpm' ] && PHPSLOT="$(eselect php show fpm)" - - PHP_FPM_CONF="/etc/php/fpm-${PHPSLOT}/php-fpm.conf" - PHP_FPM_PID="/var/run/php-fpm-${PHPSLOT}.pid" -} - -extra_commands="depend" -extra_started_commands="reload" - -depend() { - need net - use apache2 lighttpd nginx -} - -start() { - ebegin "Starting PHP FastCGI Process Manager" - set_phpvars - start-stop-daemon --start --pidfile ${PHP_FPM_PID} --exec \ - /usr/lib/${PHPSLOT}/bin/php-fpm -- -y "${PHP_FPM_CONF}" -g "${PHP_FPM_PID}" - local i=0 - local timeout=5 - while [ ! -f ${PHP_FPM_PID} ] && [ $i -le $timeout ]; do - sleep 1 - i=$(($i + 1)) - done - - [ $timeout -gt $i ] - eend $? -} - -stop() { - ebegin "Stopping PHP FastCGI Process Manager" - set_phpvars - start-stop-daemon --signal QUIT --stop --exec /usr/lib/${PHPSLOT}/bin/php-fpm --pidfile ${PHP_FPM_PID} - eend $? -} - -reload() { - ebegin "Reloading PHP FastCGI Process Manager" - set_phpvars - [ -f ${PHP_FPM_PID} ] && kill -USR2 $(cat ${PHP_FPM_PID}) - eend $? -}