aboutsummaryrefslogtreecommitdiff
path: root/lang/php8/files/php8-fastcgi.init
diff options
context:
space:
mode:
Diffstat (limited to 'lang/php8/files/php8-fastcgi.init')
-rw-r--r--lang/php8/files/php8-fastcgi.init29
1 files changed, 29 insertions, 0 deletions
diff --git a/lang/php8/files/php8-fastcgi.init b/lang/php8/files/php8-fastcgi.init
new file mode 100644
index 000000000..e6a65e5f2
--- /dev/null
+++ b/lang/php8/files/php8-fastcgi.init
@@ -0,0 +1,29 @@
+#!/bin/sh /etc/rc.common
+
+START=50
+
+SERVICE_DAEMONIZE=1
+SERVICE_WRITE_PID=1
+
+start_instance() {
+ local section="$1"
+ local enabled
+ local port
+
+ config_get_bool enabled "$section" 'enabled' 0
+ config_get port "$section" 'port'
+
+ [ $enabled -gt 0 ] || return 1
+
+ PHP_FCGI_CHILDREN='' \
+ service_start /usr/bin/php8-fcgi ${port:+-b $port}
+}
+
+start() {
+ config_load 'php8-fastcgi'
+ config_foreach start_instance 'php8-fastcgi'
+}
+
+stop() {
+ service_stop /usr/bin/php8-fcgi
+}