1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-03 06:04:53 +00:00
freebsd-ports/lang/php55/files/php-fpm.in
Alex Dupre 7fe96c1093 Welcome PHP 5.5!
Future steps:
- rename current php5 ports to php54
- make php55 the default one after an exp-run
2013-06-24 14:32:11 +00:00

44 lines
703 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: php-fpm
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable php-fpm:
# php_fpm_enable="YES"
#
. /etc/rc.subr
name="php_fpm"
rcvar=php_fpm_enable
load_rc_config "$name"
: ${php_fpm_enable="NO"}
extra_commands="reload logrotate"
command="%%PREFIX%%/sbin/php-fpm"
pidfile="/var/run/php-fpm.pid"
sig_stop="QUIT"
sig_reload="USR2"
logrotate_cmd="php_fpm_logrotate"
required_files="%%PREFIX%%/etc/php-fpm.conf"
php_fpm_logrotate() {
if [ -z "$rc_pid" ]; then
_run_rc_notrunning
return 1
fi
echo "Rotating logs $name."
kill -USR1 $rc_pid
}
run_rc_command "$1"