mirror of
https://github.com/TecharoHQ/anubis.git
synced 2025-09-08 12:15:28 -04:00

* Create anubis.freebsd add freebsd rc.d script so can be run as a freebsd daemon Signed-off-by: Paul Wilde <31094984+pswilde@users.noreply.github.com> * Update CHANGELOG.md Signed-off-by: Paul Wilde <31094984+pswilde@users.noreply.github.com> --------- Signed-off-by: Paul Wilde <31094984+pswilde@users.noreply.github.com>
35 lines
721 B
Bash
35 lines
721 B
Bash
#!/bin/sh
|
|
|
|
# PROVIDE: anubis
|
|
# REQUIRE: NETWORKING
|
|
# KEYWORD: shutdown
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=anubis
|
|
rcvar=anubis_enable
|
|
|
|
load_rc_config ${name}
|
|
|
|
: ${anubis_enable="NO"}
|
|
: ${anubis_user="anubis"}
|
|
: ${anubis_bin="/usr/local/bin/anubis"}
|
|
: ${anubis_environment_file="/etc/anubis.env"}
|
|
|
|
command=/usr/sbin/daemon
|
|
procname=${anubis_bin}
|
|
pidfile=/var/run/anubis.pid
|
|
logfile=/var/log/anubis.log
|
|
command_args="-c -f -p ${pidfile} -o ${logfile} ${procname}"
|
|
start_precmd=anubis_precmd
|
|
|
|
anubis_precmd () {
|
|
export $(xargs < ${anubis_environment_file})
|
|
if [ ! -f ${logfile} ]; then
|
|
install -o anubis /dev/null ${logfile}
|
|
fi
|
|
install -o anubis /dev/null ${pidfile}
|
|
}
|
|
|
|
run_rc_command "$1"
|