~dricottone/huttese-apk

ref: 56ea7f0ef754051e1bf3bd6b76a0e075d3086aa4 huttese-apk/sr.ht/legacy.sr.ht-shim/legacy.sr.ht-shim.initd -rwxr-xr-x 730 bytes
56ea7f0e — Drew DeVault pkgkit: generate new abuild keys if necessary 4 years ago
                                                                                
32e1b3cd Drew DeVault
b33d1949 Drew DeVault
32e1b3cd Drew DeVault
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/sbin/openrc-run
name="legacy.sr.ht-shim"
description="legacy.sr.ht shim API service"
supervisor=supervise-daemon
LEGACYSHIM_USER=${LEGACYSHIM_USER:-legacyshim}
LEGACYSHIM_BIND=${LEGACYSHIM_BIND:-127.0.0.1:5001}
LEGACYSHIM_ARGS=${LEGACYSHIM_ARGS:-}
LOCAL_PG=${LOCAL_PG:-yes}
LOCAL_REDIS=${LOCAL_REDIS:-yes}
LOGS=/var/log/legacy.sr.ht-shim.log
supervise_daemon_args="-1 $LOGS -2 $LOGS"
command="/usr/bin/gunicorn"
command_args="legacyshim.app:app -b $LEGACYSHIM_BIND $LEGACYSHIM_ARGS"
command_user="$LEGACYSHIM_USER:$LEGACYSHIM_USER"

depend() {
	need net
	[ "$LOCAL_REDIS" = "yes" ] && need redis
	[ "$LOCAL_PG" = "yes" ] && need postgresql
}

start_pre() {
	checkpath -f "$LOGS" -m 644 -o "$LEGACYSHIM_USER:$LEGACYSHIM_USER"
}