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