ayaports/user/papermc/papermc.initd
Antoine Martin 9e7a9c464e
All checks were successful
/ lint (pull_request) Successful in 42s
/ deploy-x86_64 (pull_request) Successful in 29s
/ build-x86_64 (pull_request) Successful in 4m14s
/ deploy-aarch64 (pull_request) Successful in 1m2s
/ build-aarch64 (pull_request) Successful in 15m44s
user/papermc: move from unmaintained, upgrade to 1.21.3
2024-12-10 16:20:45 -05:00

32 lines
687 B
Text

#!/sbin/openrc-run
# Distributed under the terms of the GNU General Public License, v2 or later
PAPERMC_HOME=${PAPERMC_HOME:-/var/lib/${SVCNAME}}
PAPERMC_USER=${PAPERMC_USER:-${SVCNAME}}
PIDFILE=/run/papermc/papermc.pid
depend() {
after net
}
start() {
checkpath -dq -o papermc:papermc -m 755 /run/papermc/
ebegin "Starting ${SVCNAME}"
start-stop-daemon \
--start --user "${PAPERMC_USER}" --name papermc \
--env HOME="${PAPERMC_HOME}" --exec /usr/bin/papermc \
--pidfile="${PIDFILE}" \
-- \
start
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --user "${PAPERMC_USER}" \
--pidfile "${PIDFILE}" \
--wait 15000 \
--progress
eend $?
}