#!/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=`set_rcvar` extra_commands="reload" command="%%PREFIX%%/bin/redis-server" config_file="%%PREFIX%%/etc/$name.conf" command_args="${config_file}" pidfile="%%REDIS_RUNDIR%%/$name.pid" required_files="${config_file}" # read configuration and set defaults load_rc_config "$name" : ${redis_enable="NO"} : ${redis_user="%%REDIS_USER%%"} : ${redis_flags=""} run_rc_command "$1"