#!/bin/sh # # $FreeBSD$ # # PROVIDE: %%NAME%% # REQUIRE: LOGIN abi # BEFORE: securelevel # KEYWORD: FreeBSD shutdown # Add the following line to /etc/rc.conf to enable `%%NAME%%': # #%%NAME%%_enable="YES" # # See %%NAME%%(1) for %%NAME%%_flags # . "%%RC_SUBR%%" name="%%NAME%%" rcvar=`set_rcvar` # use when the daemon uses SIGHUP to reparse its configuration files # #extra_commands="reload" # path to your executable, might be libxec, bin, sbin, ... command="%%PREFIX%%/sbin/$name" # needed when your daemon is a perl script #command_interpreter="%%PERL%%" # extra required arguments #command_args="--daemon" # uncomment when the daemon creates a pid file (highly recommended). # #pidfile="/var/run/$name.pid" # use when the daemon requires a configuration file to run, # #required_files="%%PREFIX%%/etc/$name.conf" # you can check for required_dirs and required_vars too, see rc.subr(8) # #required_dirs="/var/log/$name" # use the following when the daemon does not delete its pid file # #stop_postcmd=stop_postcmd # #stop_postcmd() #{ # if ! rm "$pidfile" 2>/dev/null; then # warn "Couldn't remove $pidfile" # fi #} # set defaults : ${%%NAME%%_enable="NO"} : ${%%NAME%%_flags=""} load_rc_config "$name" run_rc_command "$1"