added package definition for Bitcoin Cash blockbook
This commit is contained in:
parent
173a0feb4a
commit
11e519970e
1
build/deb/debian/blockbook-bch-testnet.conffiles
Normal file
1
build/deb/debian/blockbook-bch-testnet.conffiles
Normal file
@ -0,0 +1 @@
|
|||||||
|
/opt/blockbook/bch-testnet/config/blockchaincfg.json
|
||||||
2
build/deb/debian/blockbook-bch-testnet.cron.daily
Normal file
2
build/deb/debian/blockbook-bch-testnet.cron.daily
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
find /opt/blockbook/bch-testnet/logs -mtime +6 -type f -delete
|
||||||
2
build/deb/debian/blockbook-bch-testnet.dirs
Normal file
2
build/deb/debian/blockbook-bch-testnet.dirs
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/data/bch-testnet/blockbook
|
||||||
|
/opt/blockbook/bch-testnet/logs
|
||||||
5
build/deb/debian/blockbook-bch-testnet.install
Executable file
5
build/deb/debian/blockbook-bch-testnet.install
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/dh-exec
|
||||||
|
blockbook /opt/blockbook/bch-testnet/bin
|
||||||
|
server/testcert.* /opt/blockbook/bch-testnet/cert
|
||||||
|
server/static /opt/blockbook/bch-testnet
|
||||||
|
configs/bch-testnet.json => /opt/blockbook/bch-testnet/config/blockchaincfg.json
|
||||||
2
build/deb/debian/blockbook-bch-testnet.links
Normal file
2
build/deb/debian/blockbook-bch-testnet.links
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/opt/blockbook/bch-testnet/cert/testcert.crt /opt/blockbook/bch-testnet/cert/blockbook.crt
|
||||||
|
/opt/blockbook/bch-testnet/cert/testcert.key /opt/blockbook/bch-testnet/cert/blockbook.key
|
||||||
23
build/deb/debian/blockbook-bch-testnet.postinst
Normal file
23
build/deb/debian/blockbook-bch-testnet.postinst
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
|
||||||
|
configure)
|
||||||
|
if ! id -u blockbook &> /dev/null
|
||||||
|
then
|
||||||
|
useradd --system -M -U blockbook
|
||||||
|
fi
|
||||||
|
|
||||||
|
for dir in /data/bch-testnet/blockbook /opt/blockbook/bch-testnet/logs
|
||||||
|
do
|
||||||
|
if [ "$(stat -c '%U' $dir)" != "blockbook" ]
|
||||||
|
then
|
||||||
|
chown -R blockbook:blockbook $dir
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
39
build/deb/debian/blockbook-bch-testnet.service
Normal file
39
build/deb/debian/blockbook-bch-testnet.service
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# 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-bch-testnet.service
|
||||||
|
# See "man systemd.service" for details.
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Blockbook daemon (BCH testnet)
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/opt/blockbook/bch-testnet/bin/blockbook -coin=bch-testnet -blockchaincfg=/opt/blockbook/bch-testnet/config/blockchaincfg.json -datadir=/data/bch-testnet/blockbook/db -sync -httpserver=:18435 -socketio=:18436 -certfile=/opt/blockbook/bch-testnet/cert/blockbook -explorer=https://bch-bitcore1.trezor.io/ -log_dir=/opt/blockbook/bch-testnet/logs
|
||||||
|
User=blockbook
|
||||||
|
Type=simple
|
||||||
|
Restart=on-failure
|
||||||
|
WorkingDirectory=/opt/blockbook/bch-testnet
|
||||||
|
|
||||||
|
# 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
build/deb/debian/blockbook-bch.conffiles
Normal file
1
build/deb/debian/blockbook-bch.conffiles
Normal file
@ -0,0 +1 @@
|
|||||||
|
/opt/blockbook/bch/config/blockchaincfg.json
|
||||||
2
build/deb/debian/blockbook-bch.cron.daily
Normal file
2
build/deb/debian/blockbook-bch.cron.daily
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
find /opt/blockbook/bch/logs -mtime +6 -type f -delete
|
||||||
2
build/deb/debian/blockbook-bch.dirs
Normal file
2
build/deb/debian/blockbook-bch.dirs
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/data/bch/blockbook
|
||||||
|
/opt/blockbook/bch/logs
|
||||||
5
build/deb/debian/blockbook-bch.install
Executable file
5
build/deb/debian/blockbook-bch.install
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/dh-exec
|
||||||
|
blockbook /opt/blockbook/bch/bin
|
||||||
|
server/testcert.* /opt/blockbook/bch/cert
|
||||||
|
server/static /opt/blockbook/bch
|
||||||
|
configs/bch.json => /opt/blockbook/bch/config/blockchaincfg.json
|
||||||
2
build/deb/debian/blockbook-bch.links
Normal file
2
build/deb/debian/blockbook-bch.links
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/opt/blockbook/bch/cert/testcert.crt /opt/blockbook/bch/cert/blockbook.crt
|
||||||
|
/opt/blockbook/bch/cert/testcert.key /opt/blockbook/bch/cert/blockbook.key
|
||||||
23
build/deb/debian/blockbook-bch.postinst
Normal file
23
build/deb/debian/blockbook-bch.postinst
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
|
||||||
|
configure)
|
||||||
|
if ! id -u blockbook &> /dev/null
|
||||||
|
then
|
||||||
|
useradd --system -M -U blockbook
|
||||||
|
fi
|
||||||
|
|
||||||
|
for dir in /data/bch/blockbook /opt/blockbook/bch/logs
|
||||||
|
do
|
||||||
|
if [ "$(stat -c '%U' $dir)" != "blockbook" ]
|
||||||
|
then
|
||||||
|
chown -R blockbook:blockbook $dir
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
|
||||||
|
esac
|
||||||
|
|
||||||
|
#DEBHELPER#
|
||||||
39
build/deb/debian/blockbook-bch.service
Normal file
39
build/deb/debian/blockbook-bch.service
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
# 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-bch.service
|
||||||
|
# See "man systemd.service" for details.
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
Description=Blockbook daemon (BCH mainnet)
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStart=/opt/blockbook/bch/bin/blockbook -coin=bch -blockchaincfg=/opt/blockbook/bch/config/blockchaincfg.json -datadir=/data/bch/blockbook/db -sync -httpserver=:8435 -socketio=:8436 -certfile=/opt/blockbook/bch/cert/blockbook -explorer=https://bitcore1.trezor.io/ -log_dir=/opt/blockbook/bch/logs
|
||||||
|
User=blockbook
|
||||||
|
Type=simple
|
||||||
|
Restart=on-failure
|
||||||
|
WorkingDirectory=/opt/blockbook/bch
|
||||||
|
|
||||||
|
# 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
|
||||||
@ -8,14 +8,24 @@ Standards-Version: 3.9.5
|
|||||||
Package: blockbook-btc
|
Package: blockbook-btc
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}, coreutils, passwd, findutils
|
Depends: ${shlibs:Depends}, ${misc:Depends}, coreutils, passwd, findutils
|
||||||
Description: Satoshilabs blockbook server
|
Description: Satoshilabs blockbook server (Bitcoin mainnet)
|
||||||
|
|
||||||
Package: blockbook-btc-testnet
|
Package: blockbook-btc-testnet
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}, coreutils, passwd, findutils
|
Depends: ${shlibs:Depends}, ${misc:Depends}, coreutils, passwd, findutils
|
||||||
Description: Satoshilabs blockbook server
|
Description: Satoshilabs blockbook server (Bitcoin testnet)
|
||||||
|
|
||||||
Package: blockbook-zec
|
Package: blockbook-zec
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
Depends: ${shlibs:Depends}, ${misc:Depends}, coreutils, passwd, findutils
|
Depends: ${shlibs:Depends}, ${misc:Depends}, coreutils, passwd, findutils
|
||||||
Description: Satoshilabs blockbook server
|
Description: Satoshilabs blockbook server (ZCash mainnet)
|
||||||
|
|
||||||
|
Package: blockbook-bch
|
||||||
|
Architecture: amd64
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}, coreutils, passwd, findutils
|
||||||
|
Description: Satoshilabs blockbook server (Bitcoin Cash mainnet)
|
||||||
|
|
||||||
|
Package: blockbook-bch-testnet
|
||||||
|
Architecture: amd64
|
||||||
|
Depends: ${shlibs:Depends}, ${misc:Depends}, coreutils, passwd, findutils
|
||||||
|
Description: Satoshilabs blockbook server (Bitcoin Cash testnet)
|
||||||
|
|||||||
8
configs/bch-testnet.json
Normal file
8
configs/bch-testnet.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"rpcURL": "http://localhost:18432",
|
||||||
|
"rpcUser": "rpc",
|
||||||
|
"rpcPass": "rpc",
|
||||||
|
"rpcTimeout": 25,
|
||||||
|
"parse": true,
|
||||||
|
"zeroMQBinding": "tcp://127.0.0.1:18434"
|
||||||
|
}
|
||||||
8
configs/bch.json
Normal file
8
configs/bch.json
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"rpcURL": "http://127.0.0.1:8432",
|
||||||
|
"rpcUser": "rpc",
|
||||||
|
"rpcPass": "rpc",
|
||||||
|
"rpcTimeout": 25,
|
||||||
|
"parse": true,
|
||||||
|
"zeroMQBinding": "tcp://127.0.0.1:8434"
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user