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.

28 lines
429 B

  1. #!/bin/sh /etc/rc.common
  2. START=50
  3. PROG=/usr/bin/php8-fpm
  4. CONFIG=/etc/php8-fpm.conf
  5. SERVICE_PID_FILE=/var/run/php8-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 'php8-fpm'
  15. config_foreach start_instance 'php8-fpm'
  16. }
  17. stop() {
  18. service_stop $PROG
  19. }