#!/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_fpm56=YES

$_rc_subr_loaded . /etc/rc.subr

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

load_rc_config $name
run_rc_command "$1"
