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.

29 lines
469 B

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