From f45b02697f8795f4d651cd0c82f0228c21994af2 Mon Sep 17 00:00:00 2001 From: wuqiong Date: Sat, 17 Jan 2015 00:01:49 +0800 Subject: php5: add php5-fpm module build (closes #789) Signed-off-by: wuqiong - split fpm config into main and pool file - introduced uci config file - re-worked init script Signed-off-by: Michael Heimpold --- lang/php5/files/php5-fpm.init | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lang/php5/files/php5-fpm.init (limited to 'lang/php5/files/php5-fpm.init') diff --git a/lang/php5/files/php5-fpm.init b/lang/php5/files/php5-fpm.init new file mode 100644 index 000000000..aa5397a5d --- /dev/null +++ b/lang/php5/files/php5-fpm.init @@ -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 +} -- cgit v1.2.3