Add blockbook packages for Ethereum and Ethereum Testnet Ropsten

This commit is contained in:
Martin Boehm 2018-06-13 12:37:36 +02:00
parent e7e73947bd
commit 678df188af
15 changed files with 168 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,23 @@
#!/bin/bash
set -e
case "$1" in
configure)
if ! id -u blockbook-ethereum &> /dev/null
then
useradd --system -M -U blockbook-ethereum -s /bin/false
fi
for dir in /opt/coins/data/ethereum_testnet_ropsten/blockbook /opt/coins/blockbook/ethereum_testnet_ropsten/logs
do
if [ "$(stat -c '%U' $dir)" != "blockbook-ethereum" ]
then
chown -R blockbook-ethereum:blockbook-ethereum $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-ethereum-testnet-ropsten.service
# See "man systemd.service" for details.
[Unit]
Description=Blockbook daemon (Ethereum testnet ropsten)
After=network.target
Wants=backend-ethereum-testnet-ropsten.service
[Service]
ExecStart=/opt/coins/blockbook/ethereum_testnet_ropsten/bin/blockbook -blockchaincfg=/opt/coins/blockbook/ethereum_testnet_ropsten/config/blockchaincfg.json -datadir=/opt/coins/data/ethereum_testnet_ropsten/blockbook/db -sync -httpserver=:19036 -socketio=:19136 -certfile=/opt/coins/blockbook/ethereum_testnet_ropsten/cert/blockbook -explorer=https://ropsten.etherscan.io/ -log_dir=/opt/coins/blockbook/ethereum_testnet_ropsten/logs
User=blockbook-ethereum
Type=simple
Restart=on-failure
WorkingDirectory=/opt/coins/blockbook/ethereum_testnet_ropsten
# 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

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,23 @@
#!/bin/bash
set -e
case "$1" in
configure)
if ! id -u blockbook-ethereum &> /dev/null
then
useradd --system -M -U blockbook-ethereum -s /bin/false
fi
for dir in /opt/coins/data/ethereum/blockbook /opt/coins/blockbook/ethereum/logs
do
if [ "$(stat -c '%U' $dir)" != "blockbook-ethereum" ]
then
chown -R blockbook-ethereum:blockbook-ethereum $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-ethereum.service
# See "man systemd.service" for details.
[Unit]
Description=Blockbook daemon (Ethereum mainnet)
After=network.target
Wants=backend-ethereum.service
[Service]
ExecStart=/opt/coins/blockbook/ethereum/bin/blockbook -blockchaincfg=/opt/coins/blockbook/ethereum/config/blockchaincfg.json -datadir=/opt/coins/data/ethereum/blockbook/db -sync -httpserver=:9036 -socketio=:9136 -certfile=/opt/coins/blockbook/ethereum/cert/blockbook -explorer=https://etherscan.io/ -log_dir=/opt/coins/blockbook/ethereum/logs
User=blockbook-ethereum
Type=simple
Restart=on-failure
WorkingDirectory=/opt/coins/blockbook/ethereum
# 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

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