Merge pull request #4940 from diizzyy/patch-95
[feed/packages.git] / lang / php7 / files / php7-fpm.init
1 #!/bin/sh /etc/rc.common
2
3 START=50
4
5 PROG=/usr/bin/php-fpm
6 CONFIG=/etc/php7-fpm.conf
7
8 SERVICE_PID_FILE=/var/run/php7-fpm.pid
9
10 start_instance() {
11 local section="$1"
12 local enabled
13
14 config_get_bool enabled "$section" 'enabled' 0
15
16 [ $enabled -gt 0 ] || return 1
17
18 service_start $PROG -y $CONFIG -g $SERVICE_PID_FILE
19 }
20
21 start() {
22 config_load 'php7-fpm'
23 config_foreach start_instance 'php7-fpm'
24 }
25
26 stop() {
27 service_stop $PROG
28 }