You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
503 B

  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. }