#!/bin/sh
#
# $NetBSD: php_fpm.sh,v 1.5 2025/03/27 15:51:04 gdt Exp $
#
# PROVIDE: php_fpm
# REQUIRE: DAEMON
#
# Consider installing pkgtools/rc.subr in unprivileged.
#
# You will need to set some variables in /etc/rc.conf to start php-fpm:
#
# php_fpm74=YES

$_rc_subr_loaded . /etc/rc.subr

name="php_fpm74"
rcvar=${name}
command="/usr/pkg/sbin/php-fpm74"
required_files="/usr/pkg/etc/php/7.4/php-fpm.conf"
pidfile="/var/run/php-fpm74.pid"
sig_reload="USR2"
extra_commands="reload"

load_rc_config $name
run_rc_command "$1"
