summaryrefslogtreecommitdiff
path: root/net-p2p/monero/files/monerod.initd
blob: 580f206dbf27fba870804ff32cec89c44634326f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/sbin/openrc-run
# Copyright 2020-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

name="Monero P2P Daemon"
description="Connects to the Monero P2P network"

command=/usr/bin/monerod
pidfile=/run/${RC_SVCNAME}/${RC_SVCNAME}.pid

supervisor=supervise-daemon

command_args="--non-interactive --config-file /etc/monero/monerod.conf"
command_progress=1
command_user="${MONEROD_USER:=monero}:${MONEROD_GROUP:=monero}"
retry="SIGTERM/30/SIGKILL/5"


depend() {
    after net
    need localmount
}

start_pre() {
    checkpath --directory --owner ${command_user} --mode 0755 \
	      /var/lib/monero /var/log/monero $(dirname ${pidfile})
}

status() {
	if supervise_status; then
		monerod status
	fi
}