ports/databases/redis-devel/files/redis.in
Sergey A. Osokin ef7625e1f6 Fix rc.d script for allow to specify the config path in rc.conf.
Bump PORTREVISION.

PR:	199607
2015-05-06 01:24:13 +00:00

34 lines
592 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: redis
# REQUIRE: LOGIN
# BEFORE: securelevel
# KEYWORD: shutdown
# Add the following line to /etc/rc.conf to enable `redis':
#
#redis_enable="YES"
#
. /etc/rc.subr
name="redis"
rcvar="${name}_enable"
extra_commands="reload"
command="%%PREFIX%%/bin/redis-server"
pidfile="%%REDIS_RUNDIR%%/$name.pid"
# read configuration and set defaults
load_rc_config "$name"
: ${redis_enable="NO"}
: ${redis_user="%%REDIS_USER%%"}
: ${redis_config="%%PREFIX%%/etc/$name.conf"}
command_args="${redis_config}"
required_files="${redis_config}"
run_rc_command "$1"