Merge branch 'pkg-generate'

This commit is contained in:
Jakub Matys 2018-07-31 10:51:35 +02:00
commit 72bf3591bf
200 changed files with 2540 additions and 1728 deletions

View File

@ -5,6 +5,8 @@ NO_CACHE = false
UPDATE_VENDOR = 1
ARGS ?=
TARGETS=$(subst .json,, $(shell ls configs/coins))
.PHONY: build build-debug test deb
build: .bin-image
@ -19,24 +21,29 @@ test: .bin-image
test-all: .bin-image
docker run -t --rm -e PACKAGER=$(PACKAGER) -e UPDATE_VENDOR=$(UPDATE_VENDOR) -v $(CURDIR):/src --network="host" $(BIN_IMAGE) make test-all ARGS="$(ARGS)"
deb: .deb-image clean-deb
docker run -t --rm -e PACKAGER=$(PACKAGER) -e UPDATE_VENDOR=$(UPDATE_VENDOR) -v $(CURDIR):/src -v $(CURDIR)/build:/out $(DEB_IMAGE) /build/build-deb.sh $(ARGS)
deb-backend-%: .deb-image
docker run -t --rm -e PACKAGER=$(PACKAGER) -e UPDATE_VENDOR=$(UPDATE_VENDOR) -v $(CURDIR):/src -v $(CURDIR)/build:/out $(DEB_IMAGE) /build/build-deb.sh backend $* $(ARGS)
tools:
docker run -t --rm -e PACKAGER=$(PACKAGER) -e UPDATE_VENDOR=$(UPDATE_VENDOR) -v $(CURDIR):/src -v $(CURDIR)/build:/out $(BIN_IMAGE) make tools ARGS="$(ARGS)"
deb-blockbook-%: .deb-image
docker run -t --rm -e PACKAGER=$(PACKAGER) -e UPDATE_VENDOR=$(UPDATE_VENDOR) -v $(CURDIR):/src -v $(CURDIR)/build:/out $(DEB_IMAGE) /build/build-deb.sh blockbook $* $(ARGS)
all: build-images deb
deb-%: .deb-image
docker run -t --rm -e PACKAGER=$(PACKAGER) -e UPDATE_VENDOR=$(UPDATE_VENDOR) -v $(CURDIR):/src -v $(CURDIR)/build:/out $(DEB_IMAGE) /build/build-deb.sh all $* $(ARGS)
$(addprefix all-, $(TARGETS)): all-%: clean-deb build-images deb-%
all: clean-deb build-images $(addprefix deb-, $(TARGETS))
build-images:
rm -f .bin-image .deb-image
$(MAKE) .bin-image .deb-image
.bin-image:
docker build --no-cache=$(NO_CACHE) -t $(BIN_IMAGE) build/bin
docker build --no-cache=$(NO_CACHE) -t $(BIN_IMAGE) build/docker/bin
@ docker images -q $(BIN_IMAGE) > $@
.deb-image: .bin-image
docker build --no-cache=$(NO_CACHE) -t $(DEB_IMAGE) build/deb
docker build --no-cache=$(NO_CACHE) -t $(DEB_IMAGE) build/docker/deb
@ docker images -q $(DEB_IMAGE) > $@
clean: clean-bin clean-deb

View File

@ -37,17 +37,18 @@ type BitcoinRPC struct {
type Configuration struct {
CoinName string `json:"coin_name"`
RPCURL string `json:"rpcURL"`
RPCUser string `json:"rpcUser"`
RPCPass string `json:"rpcPass"`
RPCTimeout int `json:"rpcTimeout"`
CoinShortcut string `json:"coin_shortcut"`
RPCURL string `json:"rpc_url"`
RPCUser string `json:"rpc_user"`
RPCPass string `json:"rpc_pass"`
RPCTimeout int `json:"rpc_timeout"`
Parse bool `json:"parse"`
ZeroMQBinding string `json:"zeroMQBinding"`
MessageQueueBinding string `json:"message_queue_binding"`
Subversion string `json:"subversion"`
BlockAddressesToKeep int `json:"blockAddressesToKeep"`
MempoolWorkers int `json:"mempoolWorkers"`
MempoolSubWorkers int `json:"mempoolSubWorkers"`
AddressFormat string `json:"addressFormat"`
BlockAddressesToKeep int `json:"block_addresses_to_keep"`
MempoolWorkers int `json:"mempool_workers"`
MempoolSubWorkers int `json:"mempool_sub_workers"`
AddressFormat string `json:"address_format"`
}
// NewBitcoinRPC returns new BitcoinRPC instance.
@ -100,7 +101,7 @@ func (b *BitcoinRPC) GetChainInfoAndInitializeMempool(bc bchain.BlockChain) (str
return "", err
}
mq, err := bchain.NewMQ(b.ChainConfig.ZeroMQBinding, b.pushHandler)
mq, err := bchain.NewMQ(b.ChainConfig.MessageQueueBinding, b.pushHandler)
if err != nil {
glog.Error("mq: ", err)
return "", err

View File

@ -30,9 +30,10 @@ const (
)
type Configuration struct {
CoinName string `json:"coin_name"`
RPCURL string `json:"rpcURL"`
RPCTimeout int `json:"rpcTimeout"`
CoinName string `json:"coin_name"`
CoinShortcut string `json:"coin_shortcut"`
RPCURL string `json:"rpc_url"`
RPCTimeout int `json:"rpc_timeout"`
}
// EthereumRPC is an interface to JSON-RPC eth service.

View File

@ -1,13 +0,0 @@
#!/bin/bash
set -e
cp -r /src/build/deb/debian .
cp -r /src/configs .
cp -r /src/static static
mkdir cert && cp /src/server/testcert.* cert
export VERSION=$(dpkg-parsechangelog | sed -rne 's/^Version: ([0-9.]+)([-+~].+)?$/\1/p')
dpkg-buildpackage -us -uc $@
mv ../*.deb /out
chown $PACKAGER /out/*.deb

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,43 +0,0 @@
# 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-bcash-testnet.service
# See "man systemd.service" for details.
[Unit]
Description=Blockbook daemon (Bcash testnet)
After=network.target
Wants=backend-bcash-testnet.service
[Service]
ExecStart=/opt/coins/blockbook/bcash_testnet/bin/blockbook -blockchaincfg=/opt/coins/blockbook/bcash_testnet/config/blockchaincfg.json -datadir=/opt/coins/data/bcash_testnet/blockbook/db -sync -internal=:19031 -public=:19131 -certfile=/opt/coins/blockbook/bcash_testnet/cert/blockbook -explorer=https://bitcoincash.blockexplorer.com/ -log_dir=/opt/coins/blockbook/bcash_testnet/logs
User=blockbook-bcash
Type=simple
Restart=on-failure
WorkingDirectory=/opt/coins/blockbook/bcash_testnet
# 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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,43 +0,0 @@
# 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-bcash.service
# See "man systemd.service" for details.
[Unit]
Description=Blockbook daemon (Bcash mainnet)
After=network.target
Wants=backend-bcash.service
[Service]
ExecStart=/opt/coins/blockbook/bcash/bin/blockbook -blockchaincfg=/opt/coins/blockbook/bcash/config/blockchaincfg.json -datadir=/opt/coins/data/bcash/blockbook/db -sync -internal=:9031 -public=:9131 -certfile=/opt/coins/blockbook/bcash/cert/blockbook -explorer=https://bitcoincash.blockexplorer.com/ -log_dir=/opt/coins/blockbook/bcash/logs
User=blockbook-bcash
Type=simple
Restart=on-failure
WorkingDirectory=/opt/coins/blockbook/bcash
# 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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,43 +0,0 @@
# 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-bitcoin-testnet.service
# See "man systemd.service" for details.
[Unit]
Description=Blockbook daemon (Bitcoin testnet)
After=network.target
Wants=backend-bitcoin-testnet.service
[Service]
ExecStart=/opt/coins/blockbook/bitcoin_testnet/bin/blockbook -blockchaincfg=/opt/coins/blockbook/bitcoin_testnet/config/blockchaincfg.json -datadir=/opt/coins/data/bitcoin_testnet/blockbook/db -sync -internal=:19030 -public=:19130 -certfile=/opt/coins/blockbook/bitcoin_testnet/cert/blockbook -explorer=/explorer -log_dir=/opt/coins/blockbook/bitcoin_testnet/logs
User=blockbook-bitcoin
Type=simple
Restart=on-failure
WorkingDirectory=/opt/coins/blockbook/bitcoin_testnet
# 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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,43 +0,0 @@
# 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-dash-testnet.service
# See "man systemd.service" for details.
[Unit]
Description=Blockbook daemon (Dash testnet)
After=network.target
Wants=backend-dash-testnet.service
[Service]
ExecStart=/opt/coins/blockbook/dash_testnet/bin/blockbook -blockchaincfg=/opt/coins/blockbook/dash_testnet/config/blockchaincfg.json -datadir=/opt/coins/data/dash_testnet/blockbook/db -sync -internal=:19033 -public=:19133 -certfile=/opt/coins/blockbook/dash_testnet/cert/blockbook -explorer=https://dash-explorer.trezor.io/ -log_dir=/opt/coins/blockbook/dash_testnet/logs
User=blockbook-dash
Type=simple
Restart=on-failure
WorkingDirectory=/opt/coins/blockbook/dash_testnet
# 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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

View File

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

View File

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

View File

@ -1,6 +0,0 @@
#!/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

@ -1,2 +0,0 @@
/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

@ -1,23 +0,0 @@
#!/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

@ -1,43 +0,0 @@
# 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 -internal=:9038 -public=:9138 -certfile=/opt/coins/blockbook/dogecoin/cert/blockbook -explorer=https://dogechain.info/ -resyncindexperiod=30011 -resyncmempoolperiod=2011 -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

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

View File

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

View File

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

View File

@ -1,6 +0,0 @@
#!/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

@ -1,2 +0,0 @@
/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

@ -1,23 +0,0 @@
#!/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

@ -1,43 +0,0 @@
# 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 -internal=:19036 -public=: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

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

View File

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

View File

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

View File

@ -1,6 +0,0 @@
#!/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

@ -1,2 +0,0 @@
/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

@ -1,23 +0,0 @@
#!/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

@ -1,43 +0,0 @@
# 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 -internal=:9036 -public=: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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,43 +0,0 @@
# 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-litecoin-testnet.service
# See "man systemd.service" for details.
[Unit]
Description=Blockbook daemon (Litecoin testnet)
After=network.target
Wants=backend-litecoin-testnet.service
[Service]
ExecStart=/opt/coins/blockbook/litecoin_testnet/bin/blockbook -blockchaincfg=/opt/coins/blockbook/litecoin_testnet/config/blockchaincfg.json -datadir=/opt/coins/data/litecoin_testnet/blockbook/db -sync -internal=:19034 -public=:19134 -certfile=/opt/coins/blockbook/litecoin_testnet/cert/blockbook -explorer=http://explorer.litecointools.com/ -log_dir=/opt/coins/blockbook/litecoin_testnet/logs
User=blockbook-litecoin
Type=simple
Restart=on-failure
WorkingDirectory=/opt/coins/blockbook/litecoin_testnet
# 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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

@ -1,2 +0,0 @@
ldb /opt/coins/blockbook/tools
sst_dump /opt/coins/blockbook/tools

View File

@ -1,2 +0,0 @@
/opt/coins/blockbook/tools/ldb /usr/bin/ldb
/opt/coins/blockbook/tools/sst_dump /usr/bin/sst_dump

View File

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

View File

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

View File

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

Some files were not shown because too many files have changed in this diff Show More