mirror of
https://github.com/restic/rest-server.git
synced 2025-10-19 15:43:21 +00:00
26 lines
425 B
Bash
26 lines
425 B
Bash
#!/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 \
|
|
--private-repos \
|
|
--tls \
|
|
--tls-cert "/etc/ssl/rest-server.crt" \
|
|
--tls-key "/etc/ssl/private/rest-server.key" &
|
|
}
|
|
|
|
run_rc_command "$1"
|