lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

php7-fastcgi.init (465B)


      1 #!/bin/sh /etc/rc.common
      2 
      3 START=50
      4 
      5 SERVICE_DAEMONIZE=1
      6 SERVICE_WRITE_PID=1
      7 
      8 start_instance() {
      9 	local section="$1"
     10 	local enabled
     11 	local port
     12 
     13 	config_get_bool enabled "$section" 'enabled' 0
     14 	config_get port "$section" 'port' 1026
     15 
     16 	[ $enabled -gt 0 ] || return 1
     17 
     18 	PHP_FCGI_CHILDREN='' \
     19 	service_start /usr/bin/php-fcgi -b $port
     20 }
     21 
     22 start() {
     23 	config_load 'php7-fastcgi'
     24 	config_foreach start_instance 'php7-fastcgi'
     25 }
     26 
     27 stop() {
     28 	service_stop /usr/bin/php-fcgi
     29 }