1
0

php7-fpm.init 428 B

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