zot-bin: Initial import
Signed-off-by: Stefan Knoblich <stkn@bitplumber.de>
This commit is contained in:
0
app-containers/zot-bin/files/zot.confd
Normal file
0
app-containers/zot-bin/files/zot.confd
Normal file
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}"
|
||||
}
|
||||
21
app-containers/zot-bin/files/zot.service
Normal file
21
app-containers/zot-bin/files/zot.service
Normal file
@@ -0,0 +1,21 @@
|
||||
[Unit]
|
||||
Description=Zot OCI registry
|
||||
Documentation=https://github.com/project-zot/zot
|
||||
After=network.target auditd.service local-fs.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/sbin/zot /etc/zot/config.json
|
||||
Restart=on-failure
|
||||
User=zot
|
||||
Group=zot
|
||||
LimitNOFILE=500000
|
||||
|
||||
WorkingDirectory=/var/lib/zot
|
||||
StateDirectory=zot
|
||||
StateDirectoryMode=0750
|
||||
CacheDirectory=zot
|
||||
CacheDirectoryMode=0750
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user