Added package for DASH node (mainnet and testnet)
This commit is contained in:
parent
76be70d4cf
commit
12e201b3db
@ -1,4 +1,4 @@
|
||||
TARGETS = bitcoin zcash bcash ethereum bgold
|
||||
TARGETS = bitcoin zcash bcash ethereum bgold dash
|
||||
IMAGE = blockbook-backend-build-deb
|
||||
NO_CACHE = false
|
||||
|
||||
|
||||
14
contrib/backends/dash/Makefile
Normal file
14
contrib/backends/dash/Makefile
Normal file
@ -0,0 +1,14 @@
|
||||
DASH_VERSION := 0.12.2
|
||||
DASH_BUILD := .3
|
||||
|
||||
all:
|
||||
wget https://github.com/dashpay/dash/releases/download/v${DASH_VERSION}${DASH_BUILD}/dashcore-${DASH_VERSION}${DASH_BUILD}-linux64.tar.gz
|
||||
tar -xf dashcore-${DASH_VERSION}${DASH_BUILD}-linux64.tar.gz
|
||||
mv dashcore-${DASH_VERSION} dash
|
||||
rm dash/bin/dash-qt
|
||||
rm dash/bin/test_dash
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf dash
|
||||
rm -f dashcore-${DASH_VERSION}${DASH_BUILD}-linux64.tar.gz
|
||||
20
contrib/backends/dash/dash.conf
Normal file
20
contrib/backends/dash/dash.conf
Normal file
@ -0,0 +1,20 @@
|
||||
daemon=1
|
||||
server=1
|
||||
nolisten=1
|
||||
rpcuser=rpc
|
||||
rpcpassword=rpc
|
||||
rpcport=8033
|
||||
txindex=1
|
||||
addressindex=1
|
||||
timestampindex=1
|
||||
spentindex=1
|
||||
|
||||
zmqpubhashtx=tcp://127.0.0.1:38333
|
||||
zmqpubhashblock=tcp://127.0.0.1:38333
|
||||
zmqpubrawblock=tcp://127.0.0.1:38333
|
||||
zmqpubrawtx=tcp://127.0.0.1:38333
|
||||
|
||||
mempoolexpiry=72
|
||||
rpcworkqueue=1100
|
||||
maxmempool=2000
|
||||
dbcache=1000
|
||||
20
contrib/backends/dash/dash_testnet.conf
Normal file
20
contrib/backends/dash/dash_testnet.conf
Normal file
@ -0,0 +1,20 @@
|
||||
daemon=1
|
||||
server=1
|
||||
testnet=1
|
||||
nolisten=1
|
||||
rpcuser=rpc
|
||||
rpcpassword=rpc
|
||||
rpcport=18033
|
||||
txindex=1
|
||||
addressindex=1
|
||||
timestampindex=1
|
||||
spentindex=1
|
||||
|
||||
zmqpubhashtx=tcp://127.0.0.1:48333
|
||||
zmqpubhashblock=tcp://127.0.0.1:48333
|
||||
zmqpubrawblock=tcp://127.0.0.1:48333
|
||||
zmqpubrawtx=tcp://127.0.0.1:48333
|
||||
|
||||
rpcworkqueue=1100
|
||||
maxmempool=2000
|
||||
dbcache=1000
|
||||
5
contrib/backends/dash/debian/changelog
Normal file
5
contrib/backends/dash/debian/changelog
Normal file
@ -0,0 +1,5 @@
|
||||
dash (0.12.2-satoshilabs1) unstable; urgency=medium
|
||||
|
||||
* Initial build
|
||||
|
||||
-- Jakub Matys <jakub.matys@satoshilabs.com> Fri, 08 Jun 2018 11:27:03 +0200
|
||||
1
contrib/backends/dash/debian/compat
Normal file
1
contrib/backends/dash/debian/compat
Normal file
@ -0,0 +1 @@
|
||||
9
|
||||
16
contrib/backends/dash/debian/control
Normal file
16
contrib/backends/dash/debian/control
Normal file
@ -0,0 +1,16 @@
|
||||
Source: dash
|
||||
Section: satoshilabs
|
||||
Priority: optional
|
||||
Maintainer: jakub.matys@satoshilabs.com
|
||||
Build-Depends: debhelper, wget, tar, gzip, make, dh-systemd, dh-exec
|
||||
Standards-Version: 3.9.5
|
||||
|
||||
Package: dash
|
||||
Architecture: amd64
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, logrotate
|
||||
Description: Satoshilabs packaged dash server
|
||||
|
||||
Package: dash-testnet
|
||||
Architecture: amd64
|
||||
Depends: ${shlibs:Depends}, ${misc:Depends}, logrotate
|
||||
Description: Satoshilabs packaged dash server
|
||||
1
contrib/backends/dash/debian/dash-testnet.conffiles
Normal file
1
contrib/backends/dash/debian/dash-testnet.conffiles
Normal file
@ -0,0 +1 @@
|
||||
/opt/coins/nodes/dash_testnet/dash_testnet.conf
|
||||
1
contrib/backends/dash/debian/dash-testnet.dirs
Normal file
1
contrib/backends/dash/debian/dash-testnet.dirs
Normal file
@ -0,0 +1 @@
|
||||
/opt/coins/data/dash_testnet/backend
|
||||
2
contrib/backends/dash/debian/dash-testnet.install
Normal file
2
contrib/backends/dash/debian/dash-testnet.install
Normal file
@ -0,0 +1,2 @@
|
||||
dash/* /opt/coins/nodes/dash_testnet
|
||||
dash_testnet.conf /opt/coins/nodes/dash_testnet
|
||||
10
contrib/backends/dash/debian/dash-testnet.logrotate
Normal file
10
contrib/backends/dash/debian/dash-testnet.logrotate
Normal file
@ -0,0 +1,10 @@
|
||||
/opt/coins/data/dash_testnet/backend/testnet3/debug.log
|
||||
/opt/coins/data/dash_testnet/backend/testnet3/db.log
|
||||
{
|
||||
rotate 7
|
||||
daily
|
||||
compress
|
||||
missingok
|
||||
notifempty
|
||||
copytruncate
|
||||
}
|
||||
20
contrib/backends/dash/debian/dash-testnet.postinst
Normal file
20
contrib/backends/dash/debian/dash-testnet.postinst
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
|
||||
configure)
|
||||
if ! id -u dash &> /dev/null
|
||||
then
|
||||
useradd --system -M -U dash -s /bin/false
|
||||
fi
|
||||
|
||||
if [ "$(stat -c '%U' /opt/coins/data/dash_testnet/backend)" != "dash" ]
|
||||
then
|
||||
chown -R dash:dash /opt/coins/data/dash_testnet/backend
|
||||
fi
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
47
contrib/backends/dash/debian/dash-testnet.service
Normal file
47
contrib/backends/dash/debian/dash-testnet.service
Normal file
@ -0,0 +1,47 @@
|
||||
# It is not recommended to modify this file in-place, because it will
|
||||
# be overwritten during package upgrades. If you want to add further
|
||||
# options or overwrite existing ones then use
|
||||
# $ systemctl edit dash-testnet.service
|
||||
# See "man systemd.service" for details.
|
||||
|
||||
# Note that almost all daemon options could be specified in
|
||||
# /opt/coins/nodes/dash_testnet/dash_testnet.conf
|
||||
|
||||
[Unit]
|
||||
Description=DASH daemon (testnet)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/coins/nodes/dash_testnet/bin/dashd -datadir=/opt/coins/data/dash_testnet/backend -conf=/opt/coins/nodes/dash_testnet/dash_testnet.conf -pid=/run/dashd/dash_testnet.pid
|
||||
# Creates /run/dashd owned by dash
|
||||
RuntimeDirectory=dashd
|
||||
User=dash
|
||||
Type=forking
|
||||
PIDFile=/run/dashd/dash_testnet.pid
|
||||
Restart=on-failure
|
||||
|
||||
# Resource limits
|
||||
LimitNOFILE=500000
|
||||
|
||||
# Hardening measures
|
||||
####################
|
||||
|
||||
# Provide a private /tmp and /var/tmp.
|
||||
PrivateTmp=true
|
||||
|
||||
# Mount /usr, /boot/ and /etc read-only for the process.
|
||||
ProtectSystem=full
|
||||
|
||||
# Disallow the process and all of its children to gain
|
||||
# new privileges through execve().
|
||||
NoNewPrivileges=true
|
||||
|
||||
# Use a new /dev namespace only populated with API pseudo devices
|
||||
# such as /dev/null, /dev/zero and /dev/random.
|
||||
PrivateDevices=true
|
||||
|
||||
# Deny the creation of writable and executable memory mappings.
|
||||
MemoryDenyWriteExecute=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
1
contrib/backends/dash/debian/dash.conffiles
Normal file
1
contrib/backends/dash/debian/dash.conffiles
Normal file
@ -0,0 +1 @@
|
||||
/opt/coins/nodes/dash/dash.conf
|
||||
1
contrib/backends/dash/debian/dash.dirs
Normal file
1
contrib/backends/dash/debian/dash.dirs
Normal file
@ -0,0 +1 @@
|
||||
/opt/coins/data/dash/backend
|
||||
2
contrib/backends/dash/debian/dash.install
Normal file
2
contrib/backends/dash/debian/dash.install
Normal file
@ -0,0 +1,2 @@
|
||||
dash/* /opt/coins/nodes/dash
|
||||
dash.conf /opt/coins/nodes/dash
|
||||
10
contrib/backends/dash/debian/dash.logrotate
Normal file
10
contrib/backends/dash/debian/dash.logrotate
Normal file
@ -0,0 +1,10 @@
|
||||
/opt/coins/data/dash/backend/debug.log
|
||||
/opt/coins/data/dash/backend/db.log
|
||||
{
|
||||
rotate 7
|
||||
daily
|
||||
compress
|
||||
missingok
|
||||
notifempty
|
||||
copytruncate
|
||||
}
|
||||
20
contrib/backends/dash/debian/dash.postinst
Normal file
20
contrib/backends/dash/debian/dash.postinst
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
|
||||
configure)
|
||||
if ! id -u dash &> /dev/null
|
||||
then
|
||||
useradd --system -M -U dash -s /bin/false
|
||||
fi
|
||||
|
||||
if [ "$(stat -c '%U' /opt/coins/data/dash/backend)" != "dash" ]
|
||||
then
|
||||
chown -R dash:dash /opt/coins/data/dash/backend
|
||||
fi
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
47
contrib/backends/dash/debian/dash.service
Normal file
47
contrib/backends/dash/debian/dash.service
Normal file
@ -0,0 +1,47 @@
|
||||
# It is not recommended to modify this file in-place, because it will
|
||||
# be overwritten during package upgrades. If you want to add further
|
||||
# options or overwrite existing ones then use
|
||||
# $ systemctl edit dash.service
|
||||
# See "man systemd.service" for details.
|
||||
|
||||
# Note that almost all daemon options could be specified in
|
||||
# /opt/coins/nodes/dash/dash.conf
|
||||
|
||||
[Unit]
|
||||
Description=DASH daemon (mainnet)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
ExecStart=/opt/coins/nodes/dash/bin/dashd -datadir=/opt/coins/data/dash/backend -conf=/opt/coins/nodes/dash/dash.conf -pid=/run/dashd/dash.pid
|
||||
# Creates /run/dashd owned by dash
|
||||
RuntimeDirectory=dashd
|
||||
User=dash
|
||||
Type=forking
|
||||
PIDFile=/run/dashd/dash.pid
|
||||
Restart=on-failure
|
||||
|
||||
# Resource limits
|
||||
LimitNOFILE=500000
|
||||
|
||||
# Hardening measures
|
||||
####################
|
||||
|
||||
# Provide a private /tmp and /var/tmp.
|
||||
PrivateTmp=true
|
||||
|
||||
# Mount /usr, /boot/ and /etc read-only for the process.
|
||||
ProtectSystem=full
|
||||
|
||||
# Disallow the process and all of its children to gain
|
||||
# new privileges through execve().
|
||||
NoNewPrivileges=true
|
||||
|
||||
# Use a new /dev namespace only populated with API pseudo devices
|
||||
# such as /dev/null, /dev/zero and /dev/random.
|
||||
PrivateDevices=true
|
||||
|
||||
# Deny the creation of writable and executable memory mappings.
|
||||
MemoryDenyWriteExecute=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
11
contrib/backends/dash/debian/rules
Executable file
11
contrib/backends/dash/debian/rules
Executable file
@ -0,0 +1,11 @@
|
||||
#!/usr/bin/make -f
|
||||
|
||||
DH_VERBOSE = 1
|
||||
|
||||
%:
|
||||
dh $@ --with=systemd
|
||||
|
||||
override_dh_systemd_start:
|
||||
dh_systemd_start --no-start
|
||||
|
||||
override_dh_installinit:
|
||||
Loading…
Reference in New Issue
Block a user