28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
#!/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}"
|
|
}
|