mirror of
https://github.com/restic/rest-server.git
synced 2026-09-12 07:06:09 -07:00
add example rc scripts for OpenBSD and FreeBSD
This commit is contained in:
committed by
Zlatko Čalušić
parent
2209f1437e
commit
dfe9755ed0
@@ -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"
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/ksh
|
||||||
|
#
|
||||||
|
# $OpenBSD: $
|
||||||
|
|
||||||
|
daemon="/usr/local/bin/rest-server"
|
||||||
|
daemon_flags="--path /var/restic"
|
||||||
|
daemon_user="_restic"
|
||||||
|
|
||||||
|
. /etc/rc.d/rc.subr
|
||||||
|
|
||||||
|
rc_bg=YES
|
||||||
|
rc_reload=NO
|
||||||
|
|
||||||
|
rc_cmd $1
|
||||||
Reference in New Issue
Block a user