diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /net-p2p/litecoind/files/litecoin.initd-r1 |
reinit the tree, so we can have metadata
Diffstat (limited to 'net-p2p/litecoind/files/litecoin.initd-r1')
-rw-r--r-- | net-p2p/litecoind/files/litecoin.initd-r1 | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/net-p2p/litecoind/files/litecoin.initd-r1 b/net-p2p/litecoind/files/litecoin.initd-r1 new file mode 100644 index 000000000000..bc7f307f47a6 --- /dev/null +++ b/net-p2p/litecoind/files/litecoin.initd-r1 @@ -0,0 +1,28 @@ +#!/sbin/openrc-run +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +vardir="/var/lib/litecoin" +conffile="${vardir}/.litecoin/litecoin.conf" +litecoind_user="${LITECOIN_USER:-nobody:nobody}" + +description="P2P Internet currency based on Bitcoin but easier to mine." +pidfile="/run/${SVCNAME}.pid" +command="/usr/bin/litecoind" +command_args="${LITECOIN_OPTS}" +command_background="true" +start_stop_daemon_args="-u ${litecoind_user} -e HOME=${vardir} -N ${NICELEVEL:-0} -w 2000" + +depend() { + need net +} + +start_pre() { + checkpath -f -o ${litecoind_user} -m 0400 ${conffile} || return 1 + + if ! grep -q '^rpcpassword=' "${conffile}"; then + eerror "Please edit `readlink -f ${conffile}`" + eerror "There must be at least a line assigning rpcpassword=something-secure" + return 1 + fi +} |