zot-bin: Initial import
Signed-off-by: Stefan Knoblich <stkn@bitplumber.de>
This commit is contained in:
21
app-containers/zot-bin/files/zot.initd
Normal file
21
app-containers/zot-bin/files/zot.initd
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
ZOT_USER="${ZOT_USER:-zot}"
|
||||
ZOT_GROUP="${ZOT_GROUP:-zot}"
|
||||
ZOT_CONFIG="${ZOT_CONFIG:-/etc/zot/config.json}"
|
||||
ZOT_DATA_DIR="${ZOT_DATA_DIR:-/var/lib/zot}"
|
||||
ZOT_LOG_DIR="${ZOT_LOG_DIR:-/var/log/zot}"
|
||||
|
||||
command="/usr/sbin/zot"
|
||||
command_args="${ZOT_CONFIG}"
|
||||
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
command_background="true"
|
||||
start_stop_daemon_args="--user=\"${ZOT_USER}\" --group=\"${ZOT_GROUP}\" --stdout ${ZOT_LOG_DIR}/zot.log --stderr ${ZOT_LOG_DIR}/zot.err --chdir ${ZOT_DATA_DIR}"
|
||||
|
||||
start_pre() {
|
||||
checkpath -d -o "${ZOT_USER}" -m750 "${ZOT_DATA_DIR}"
|
||||
checkpath -d -o "${ZOT_USER}" -m750 "${ZOT_LOG_DIR}"
|
||||
}
|
||||
Reference in New Issue
Block a user