Add blockbook packages for Dogecoin

This commit is contained in:
Martin Boehm 2018-06-15 13:26:18 +02:00
parent 6945d1d7f3
commit 91aa07444d
8 changed files with 84 additions and 0 deletions

View File

@ -0,0 +1 @@
/opt/coins/blockbook/dogecoin/config/blockchaincfg.json

View File

@ -0,0 +1,2 @@
#!/bin/sh
/opt/coins/blockbook/dogecoin/bin/logrotate.sh

View File

@ -0,0 +1,2 @@
/opt/coins/data/dogecoin/blockbook
/opt/coins/blockbook/dogecoin/logs

View File

@ -0,0 +1,6 @@
#!/usr/bin/dh-exec
blockbook /opt/coins/blockbook/dogecoin/bin
cert /opt/coins/blockbook/dogecoin
static /opt/coins/blockbook/dogecoin
configs/dogecoin.json => /opt/coins/blockbook/dogecoin/config/blockchaincfg.json
logrotate.sh /opt/coins/blockbook/dogecoin/bin

View File

@ -0,0 +1,2 @@
/opt/coins/blockbook/dogecoin/cert/testcert.crt /opt/coins/blockbook/dogecoin/cert/blockbook.crt
/opt/coins/blockbook/dogecoin/cert/testcert.key /opt/coins/blockbook/dogecoin/cert/blockbook.key

View File

@ -0,0 +1,23 @@
#!/bin/bash
set -e
case "$1" in
configure)
if ! id -u blockbook-dogecoin &> /dev/null
then
useradd --system -M -U blockbook-dogecoin -s /bin/false
fi
for dir in /opt/coins/data/dogecoin/blockbook /opt/coins/blockbook/dogecoin/logs
do
if [ "$(stat -c '%U' $dir)" != "blockbook-dogecoin" ]
then
chown -R blockbook-dogecoin:blockbook-dogecoin $dir
fi
done
;;
esac
#DEBHELPER#

View File

@ -0,0 +1,43 @@
# 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 blockbook-dogecoin.service
# See "man systemd.service" for details.
[Unit]
Description=Blockbook daemon (Dogecoin mainnet)
After=network.target
Wants=backend-dogecoin.service
[Service]
ExecStart=/opt/coins/blockbook/dogecoin/bin/blockbook -blockchaincfg=/opt/coins/blockbook/dogecoin/config/blockchaincfg.json -datadir=/opt/coins/data/dogecoin/blockbook/db -sync -httpserver=:9038 -socketio=:9138 -certfile=/opt/coins/blockbook/dogecoin/cert/blockbook -explorer=https://dogechain.info/ -log_dir=/opt/coins/blockbook/dogecoin/logs
User=blockbook-dogecoin
Type=simple
Restart=on-failure
WorkingDirectory=/opt/coins/blockbook/dogecoin
# 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

View File

@ -74,3 +74,8 @@ Package: blockbook-ethereum-testnet-ropsten
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, coreutils, passwd, findutils, psmisc, backend-ethereum-testnet-ropsten
Description: Satoshilabs blockbook server (Litecoin testnet)
Package: blockbook-dogecoin
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, coreutils, passwd, findutils, psmisc, backend-dogecoin
Description: Satoshilabs blockbook server (Dogecoin mainnet)