diff options
Diffstat (limited to 'sysutils/backrest/files/backrest.in')
-rw-r--r-- | sysutils/backrest/files/backrest.in | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/sysutils/backrest/files/backrest.in b/sysutils/backrest/files/backrest.in new file mode 100644 index 000000000000..5c709b0b2e12 --- /dev/null +++ b/sysutils/backrest/files/backrest.in @@ -0,0 +1,35 @@ +#!/bin/sh + +# PROVIDE: backrest +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Configuration settings for backrest in /etc/rc.conf +# +# backrest_enable (bool): Enable backrest. (Default=NO) +# backrest_env_file (str): Path containing the environment variables +# to be used by backrest. (Default: %%ETCDIR%%/config.env) +# backrest_logfile (str): Log file used to store the backrest's output. (Default: /var/log/backrest.log) +# backrest_pidfile (str): File used by backrest to store the process ID. (Default: /var/run/backrest.pid) +# backrest_runas (str): User to run backrest as. (Default: %%USER%%) + +. /etc/rc.subr + +name="backrest" +desc="Web UI and orchestrator for restic backup" +rcvar="backrest_enable" + +load_rc_config $name + +: ${backrest_enable:="NO"} +: ${backrest_env_file:="%%ETCDIR%%/config.env"} +: ${backrest_logfile:="/var/log/backrest.log"} +: ${backrest_pidfile:="/var/run/backrest.pid"} +: ${backrest_runas:="%%USER%%"} + +pidfile="${backrest_pidfile}" +procname="%%LOCALBASE%%/bin/backrest" +command="/usr/sbin/daemon" +command_args="-o '${backrest_logfile}' -p '${pidfile}' -u '${backrest_runas}' -t '${desc}' -- '${procname}'" + +run_rc_command "$1" |