-
Notifications
You must be signed in to change notification settings - Fork 0
/
example-rc-freebsd.sh
44 lines (35 loc) · 1.03 KB
/
example-rc-freebsd.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
# PROVIDE: foldergal
# REQUIRE: DAEMON NETWORKING
# KEYWORD:
. /etc/rc.subr
name="foldergal"
rcvar="foldergal_enable"
load_rc_config $name
: ${foldergal_enable:=no}
: ${foldergal_user="foldergaluser"}
: ${foldergal_chdir="/path/to/home"}
foldergal_command="/usr/local/bin/foldergal"
pidfile="/var/run/foldergal/${name}.pid"
# export FOLDERGAL_CACHE_EXPIRES_AFTER=0
# export FOLDERGAL_DISCORD_NAME=Gallery
# export FOLDERGAL_DISCORD_WEBHOOK="https://discordapp.com/api/webhooks/xxxxxx"
# export FOLDERGAL_HOME=.
# export FOLDERGAL_HOST=localhost
# export FOLDERGAL_HTTP2=false
# export FOLDERGAL_NOTIFY_AFTER=30s
# export FOLDERGAL_PORT=8080
# export FOLDERGAL_PREFIX=
# export FOLDERGAL_PUBLIC_HOST=
# export FOLDERGAL_QUIET=false
# export FOLDERGAL_ROOT=.
# export FOLDERGAL_THUMB_H=400
# export FOLDERGAL_THUMB_W=400
# export FOLDERGAL_TLS_CRT=
# export FOLDERGAL_TLS_KEY=
#
# or...
export FOLDERGAL_CONFIG="/path/to/config.json"
command="/usr/sbin/daemon"
command_args="-P ${pidfile} -r -f ${foldergal_command}"
run_rc_command "$1"