diff options
author | Stuart Cardall <developer@it-offshore.co.uk> | 2014-05-09 22:54:37 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2014-06-02 06:28:31 +0000 |
commit | aafbc92638b9011b2d3ab7179345cb6134145d29 (patch) | |
tree | 28fa82eea55f85d5b80549b4bb44897aab5ff8be /testing/namecoin/namecoin.initd | |
parent | 71132bd1561a8d0fb1f92877033f67860d46d180 (diff) | |
download | aports-aafbc92638b9011b2d3ab7179345cb6134145d29.tar.bz2 aports-aafbc92638b9011b2d3ab7179345cb6134145d29.tar.xz |
testing/namecoin: new aport
Same init / pre / post scripts as with bitcoin:
daemon runs in /var/lib/namecoin as namecoin:namecoin
APKBUILD tidied up:
source format corrected for github
patches fixed to -p1
qt() fixed
GUI builds as qt4 (there is no qt5 gui for namecoin yet)
locale patch revised to include the fix for qt - revision proposed
upstream.
python-dev is not available on 32 bit MUSL so the build will fail
there for both namecoin & bitcoin.
Diffstat (limited to 'testing/namecoin/namecoin.initd')
-rw-r--r-- | testing/namecoin/namecoin.initd | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/testing/namecoin/namecoin.initd b/testing/namecoin/namecoin.initd new file mode 100644 index 0000000000..9bdeea0893 --- /dev/null +++ b/testing/namecoin/namecoin.initd @@ -0,0 +1,38 @@ +#!/sbin/runscript + +# Namecoin init.d file for Alpine Linux. + +name=namecoind +daemon=/usr/bin/$name +config=/etc/namecoin.conf +user=namecoin +group=namecoin +## supercedes datadir set in $config ## +datadir=/var/lib/namecoin +pidfile=/var/run/namecoin/$name.pid + +depend() { + need net + after logger firewall +} + +start() { + ebegin "Starting ${name}" + # enforce permissions + checkpath -q -d ${pidfile%/*} -o ${user}:${group} + checkpath -q -d ${datadir} -m 0700 -o ${user}:${group} + checkpath -q -f ${config} -m 0600 -o ${user}:${group} + start-stop-daemon --start --quiet \ + --pidfile ${pidfile} \ + --user ${user}:${group} \ + --exec ${daemon} -- -conf=${config} -datadir=${datadir} -pid=${pidfile} + eend $? +} + +stop() { + ebegin "Stopping ${name}" + start-stop-daemon --stop --quiet \ + --pidfile ${pidfile} \ + --exec ${daemon} + eend $? +} |