zot-bin: Initial import

Signed-off-by: Stefan Knoblich <stkn@bitplumber.de>
This commit is contained in:
2024-03-28 21:29:15 +01:00
parent f9b998f1ec
commit 0eff91d4c7
9 changed files with 118 additions and 0 deletions

View 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}"
}