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
461 B

  1. #!/bin/sh /etc/rc.common
  2. # Copyright (C) 2015 OpenWrt.org
  3. START=50
  4. PROG=/usr/bin/php-fpm
  5. CONFIG=/etc/php5-fpm.conf
  6. SERVICE_PID_FILE=/var/run/php5-fpm.pid
  7. start_instance() {
  8. local section="$1"
  9. local enabled
  10. config_get_bool enabled "$section" 'enabled' 0
  11. [ $enabled -gt 0 ] || return 1
  12. service_start $PROG -y $CONFIG -g $SERVICE_PID_FILE
  13. }
  14. start() {
  15. config_load 'php5-fpm'
  16. config_foreach start_instance 'php5-fpm'
  17. }
  18. stop() {
  19. service_stop $PROG
  20. }