reposilite: Initial import

Signed-off-by: Stefan Knoblich <stkn@bitplumber.de>
This commit is contained in:
2024-03-29 17:38:01 +01:00
parent 791459b949
commit e98dd5caf6
9 changed files with 171 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
#!/sbin/openrc-run
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
REPOSILITE_USER="${REPOSILITE_USER:-reposilite}"
REPOSILITE_GROUP="${REPOSILITE_GROUP:-reposilite}"
REPOSILITE_CONFIG="${REPOSILITE_CONFIG:-/etc/reposilite/configuration.cdn}"
REPOSILITE_DATA_DIR="${REPOSILITE_DATA_DIR:-/var/lib/reposilite}"
REPOSILITE_LOG_DIR="${REPOSILITE_LOG_DIR:-/var/log/resposilite}"
export JAVA_HOME=`java-config ${REPOSILITE_JVM:+--select-vm ${REPOSILITE_JVM}} --jre-home`
command="${JAVA_HOME}/bin/java"
command_args="-jar /usr/lib/reposilite/reposilite.jar -wd ${REPOSILITE_DATA_DIR} -lc ${REPOSILITE_CONFIG} -pd ${REPOSILITE_DATA_DIR}/plugins"
pidfile="/run/${RC_SVCNAME}.pid"
command_background="true"
start_stop_daemon_args="--user=\"${REPOSILITE_USER}\" --group=\"${REPOSILITE_GROUP}\" --stdout ${REPOSILITE_LOG_DIR}/reposilite.log --stderr ${REPOSILITE_LOG_DIR}/reposilite.err --chdir ${REPOSILITE_DATA_DIR}"
depend() {
use dns logger net
}
start_pre() {
checkpath -d -o "${REPOSILITE_USER}" -m750 "${REPOSILITE_DATA_DIR}"
checkpath -d -o "${REPOSILITE_USER}" -m750 "${REPOSILITE_LOG_DIR}"
}