summaryrefslogtreecommitdiffstats
path: root/dev-lang/php/files/php-fpm.init
diff options
context:
space:
mode:
Diffstat (limited to 'dev-lang/php/files/php-fpm.init')
-rwxr-xr-xdev-lang/php/files/php-fpm.init22
1 files changed, 22 insertions, 0 deletions
diff --git a/dev-lang/php/files/php-fpm.init b/dev-lang/php/files/php-fpm.init
new file mode 100755
index 0000000..adcfd32
--- /dev/null
+++ b/dev-lang/php/files/php-fpm.init
@@ -0,0 +1,22 @@
+#!/sbin/runscript
+
+PHP_FPM_CONF="/etc/php/fpm-php5/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 $?
+}