Skip to content

Instantly share code, notes, and snippets.

@lalinsky
Created December 15, 2011 11:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lalinsky/1480735 to your computer and use it in GitHub Desktop.
Save lalinsky/1480735 to your computer and use it in GitHub Desktop.
Acoustid Index startup script (FreeBSD)
#!/bin/sh
# PROVIDE: fpserver
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf to
# enable fpserver:
#
# fpserver_enable (bool): Set to NO by default. Set it to YES to
# enable fpserver.
#
. /etc/rc.subr
name="fpserver"
rcvar=`set_rcvar`
load_rc_config $name
: ${fpserver_enable="NO"}
: ${fpserver_user="acoustid"}
: ${fpserver_bin="/home/acoustid/index/fpi-server"}
: ${fpserver_indexdir="/var/lib/acoustid/idx/"}
pidfile="/var/run/acoustid/${name}.pid"
procname="${fpserver_bin}"
command="/usr/sbin/daemon"
command_args="-cf -p ${pidfile} -- ${fpserver_bin} -d ${fpserver_indexdir} -s -f local2"
run_rc_command "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment