mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
php5: add php5-fpm module build (closes #789)
Signed-off-by: wuqiong <memccpy@gmail.com> - split fpm config into main and pool file - introduced uci config file - re-worked init script Signed-off-by: Michael Heimpold <mhei@heimpold.de>
This commit is contained in:
committed by
Michael Heimpold
parent
3687f946a2
commit
f45b02697f
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2015 OpenWrt.org
|
||||
|
||||
START=50
|
||||
|
||||
PROG=/usr/bin/php-fpm
|
||||
CONFIG=/etc/php5-fpm.conf
|
||||
|
||||
SERVICE_PID_FILE=/var/run/php5-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 'php5-fpm'
|
||||
config_foreach start_instance 'php5-fpm'
|
||||
}
|
||||
|
||||
stop() {
|
||||
service_stop $PROG
|
||||
}
|
||||
Reference in New Issue
Block a user