diff options
author | W. Michael Petullo <mike@flyn.org> | 2014-09-28 21:56:33 -0400 |
---|---|---|
committer | W. Michael Petullo <mike@flyn.org> | 2014-09-28 21:56:33 -0400 |
commit | 7771752217dced2eea46779d69c7e9534bff3893 (patch) | |
tree | c76848bc5ee4e108c29ded3a1e0f02916b3fea3b /lang/php5/files/php5-fastcgi.init | |
parent | 99f0ea47ceeaba1f901adaecbae52f93347d11c3 (diff) |
Copy php5 from old repository and update
Signed-off-by: W. Michael Petullo <mike@flyn.org>
Diffstat (limited to 'lang/php5/files/php5-fastcgi.init')
-rw-r--r-- | lang/php5/files/php5-fastcgi.init | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/lang/php5/files/php5-fastcgi.init b/lang/php5/files/php5-fastcgi.init new file mode 100644 index 000000000..0c452ad27 --- /dev/null +++ b/lang/php5/files/php5-fastcgi.init @@ -0,0 +1,30 @@ +#!/bin/sh /etc/rc.common +# Copyright (C) 2010-2011 OpenWrt.org + +START=50 + +SERVICE_DAEMONIZE=1 +SERVICE_WRITE_PID=1 + +start_instance() { + local section="$1" + local enabled + local port + + config_get_bool enabled "$section" 'enabled' 0 + config_get port "$section" 'port' 1026 + + [ $enabled -gt 0 ] || return 1 + + PHP_FCGI_CHILDREN='' \ + service_start /usr/bin/php-fcgi -b $port +} + +start() { + config_load 'php5-fastcgi' + config_foreach start_instance 'php5-fastcgi' +} + +stop() { + service_stop /usr/bin/php-fcgi +} |