packages/lang/php7/files/php7-fpm.init
Michael Heimpold 292c2ffc18 php7: add new package
This is a copy of the existing php5 stuff, adopted for PHP7.

Please not, that its not supported to install both php5
and php7 in parallel on the target.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
2016-09-03 21:51:23 +02:00

28 lines
428 B
Bash

#!/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
}