mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-25 09:32:43 +00:00
Create Anubis FreeBSD rc.d script (#274)
* 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>
This commit is contained in:
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
- Whitelisted [DuckDuckBot](https://duckduckgo.com/duckduckgo-help-pages/results/duckduckbot/) in botPolicies
|
- Whitelisted [DuckDuckBot](https://duckduckgo.com/duckduckgo-help-pages/results/duckduckbot/) in botPolicies
|
||||||
- Improvements to build scripts to make them less independent of the build host
|
- Improvements to build scripts to make them less independent of the build host
|
||||||
- Improved the OpenGraph error logging
|
- Improved the OpenGraph error logging
|
||||||
|
- Added FreeBSD rc.d script so can be run as a FreeBSD daemon.
|
||||||
|
|
||||||
## v1.16.0
|
## v1.16.0
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
#!/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"
|
||||||
Reference in New Issue
Block a user