php5-fpm.init 461 B

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