diff options
Diffstat (limited to 'main/php/php-fpm.init')
-rwxr-xr-x | main/php/php-fpm.init | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/main/php/php-fpm.init b/main/php/php-fpm.init new file mode 100755 index 000000000..6b8337e8b --- /dev/null +++ b/main/php/php-fpm.init @@ -0,0 +1,22 @@ +#!/sbin/runscript + +PHP_FPM_CONF="/etc/php/php-fpm.conf" + +opts="depend start stop reload" + +depend() { + need net + use apache2 lighttpd nginx +} + +start() { + ebegin "Starting PHP FastCGI server" + start-stop-daemon --start --exec /usr/bin/php-fpm -- -y "${PHP_FPM_CONF}" + eend $? +} + +stop() { + ebegin "Stopping PHP FastCGI server" + start-stop-daemon --stop --name php-fpm + eend $? +} |