aboutsummaryrefslogtreecommitdiffstats
path: root/main/php/php-fpm.initd
diff options
context:
space:
mode:
Diffstat (limited to 'main/php/php-fpm.initd')
-rw-r--r--main/php/php-fpm.initd22
1 files changed, 22 insertions, 0 deletions
diff --git a/main/php/php-fpm.initd b/main/php/php-fpm.initd
new file mode 100644
index 0000000000..6b8337e8b8
--- /dev/null
+++ b/main/php/php-fpm.initd
@@ -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 $?
+}