Gentoo Archives: gentoo-commits

From: "Anthony G. Basile (blueness)" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-p2p/ppcoind/files: ppcoin.initd-r1
Date: Tue, 25 Feb 2014 18:23:11
Message-Id: 20140225182304.89C292004E@flycatcher.gentoo.org
1 blueness 14/02/25 18:23:04
2
3 Added: ppcoin.initd-r1
4 Log:
5 Add imrpoved initd, bug #500602
6
7 (Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key 0xF52D4BBA)
8
9 Revision Changes Path
10 1.1 net-p2p/ppcoind/files/ppcoin.initd-r1
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/ppcoind/files/ppcoin.initd-r1?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-p2p/ppcoind/files/ppcoin.initd-r1?rev=1.1&content-type=text/plain
14
15 Index: ppcoin.initd-r1
16 ===================================================================
17 #!/sbin/runscript
18 # Copyright 1999-2014 Gentoo Foundation
19 # Distributed under the terms of the GNU General Public License v2
20 # $Header: /var/cvsroot/gentoo-x86/net-p2p/ppcoind/files/ppcoin.initd-r1,v 1.1 2014/02/25 18:23:04 blueness Exp $
21
22 vardir="/var/lib/ppcoin"
23 conffile="${vardir}/.ppcoin/ppcoin.conf"
24 ppcoind_user="${PPCOIN_USER:-nobody:nobody}"
25
26 description="Cryptocurrency forked from Bitcoin which aims to be energy efficiency."
27 pidfile="/run/${SVCNAME}.pid"
28 command="/usr/bin/ppcoind"
29 command_args="${PPCOIN_OPTS}"
30 command_background="true"
31 start_stop_daemon_args="-u ${ppcoind_user} -e HOME=${vardir} -N ${NICELEVEL:-0} -w 2000"
32
33 depend() {
34 need net
35 }
36
37 start_pre() {
38 checkpath -f -o ${ppcoind_user} -m 0400 ${conffile} || return 1
39
40 if ! grep -q '^rpcpassword=' "${conffile}"; then
41 eerror "Please edit `readlink -f ${conffile}`"
42 eerror "There must be at least a line assigning rpcpassword=something-secure"
43 return 1
44 fi
45 }