Merge pull request #10687

997bd99 utils: add openrc init script (jpk68)
This commit is contained in:
tobtoht
2026-06-04 19:27:22 +00:00
2 changed files with 41 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
#!/sbin/openrc-run
name="Monero Daemon"
description="Monero cryptocurrency node"
command="/usr/bin/monerod"
command_args="--non-interactive ${MONEROD_OPTS}"
if [ -n "${MONEROD_CONFIG}" ] && [ -f "${MONEROD_CONFIG}" ]; then
command_args="${command_args} --config-file ${MONEROD_CONFIG}"
fi
command_user="${MONEROD_USER}:${MONEROD_GROUP}"
supervisor="supervise-daemon"
respawn_delay=10
respawn_max=0
depend() {
after net
}
start_pre() {
checkpath \
--directory \
--owner "${MONEROD_USER}:${MONEROD_GROUP}" \
--mode 0750 \
"${MONEROD_DATA_DIR}"
if [ -n "${MONEROD_CONFIG}" ] && [ ! -f "${MONEROD_CONFIG}" ]; then
ewarn "Config file not found: ${MONEROD_CONFIG}"
fi
}
+7
View File
@@ -0,0 +1,7 @@
MONEROD_USER="monero"
MONEROD_GROUP="monero"
MONEROD_DATA_DIR="/var/lib/monero"
MONEROD_CONFIG="/etc/monerod.conf"
MONEROD_OPTS="--data-dir ${MONEROD_DATA_DIR}"