freebsd-ports/databases/redis/files/redis.in
Matthias Andree 0da998d98d Make configuration file path configurable in rc.conf. [1]
Convert to stage support.  State which BSD license is meant. [2]

PR:		ports/181201 [1]
Submitted by:	Daniel Ylitalo <daniel@blodan.se> [1]
Approved by:	maintainer timeout (osa, 6 months) [1]
Approved by:	portmgr (blanket) [2]
2014-03-13 21:13:39 +00:00

35 lines
589 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=redis_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"