add example rc scripts for OpenBSD and FreeBSD

This commit is contained in:
Aaron Bieber
2018-02-28 07:35:23 -07:00
committed by Zlatko Čalušić
parent 2209f1437e
commit dfe9755ed0
2 changed files with 41 additions and 0 deletions

27
examples/bsd/freebsd Normal file
View File

@@ -0,0 +1,27 @@
#!/bin/sh
. /etc/rc.subr
name=restserver
rcvar=restserver_enable
start_cmd="${name}_start"
stop_cmd=":"
load_rc_config $name
: ${restserver_enable:=no}
: ${restserver_msg="Nothing started."}
datadir="/backups"
restserver_start()
{
rest-server --path $datadir \
--listen 10.0.1.6:8000 \
--private-repos \
--tls \
--tls-cert "/etc/ssl/rest-server.crt" \
--tls-key "/etc/ssl/private/rest-server.key" &
}
run_rc_command "$1"