php5-fastcgi.init 503 B

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