Renamed bgold package and paths

This commit is contained in:
Jakub Matys 2018-06-06 14:06:46 +02:00
parent 2e83bdc4c0
commit 60733b3c9b
16 changed files with 46 additions and 45 deletions

View File

@ -31,7 +31,7 @@ func init() {
blockChainFactories["Ethereum Testnet Ropsten"] = eth.NewEthereumRPC
blockChainFactories["bch"] = bch.NewBCashRPC
blockChainFactories["bch-testnet"] = bch.NewBCashRPC
blockChainFactories["btg"] = btg.NewBGoldRPC
blockChainFactories["Bgold"] = btg.NewBGoldRPC
}
// GetCoinNameFromConfig gets coin name from config file

View File

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

View File

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

View File

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

View File

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

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

@ -0,0 +1,23 @@
#!/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,20 +1,20 @@
# 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-btg.service
# $ systemctl edit blockbook-bgold.service
# See "man systemd.service" for details.
[Unit]
Description=Blockbook daemon (BTG mainnet)
Description=Blockbook daemon (Bitcoin Gold mainnet)
After=network.target
Wants=bgold-btg.service
Wants=bgold.service
[Service]
ExecStart=/opt/coins/blockbook/btg/bin/blockbook -coin=btg -blockchaincfg=/opt/coins/blockbook/btg/config/blockchaincfg.json -datadir=/opt/coins/data/btg/blockbook/db -sync -httpserver=:9035 -socketio=:9135 -certfile=/opt/coins/blockbook/btg/cert/blockbook -explorer=https://btg-bitcore1.trezor.io/ -log_dir=/opt/coins/blockbook/btg/logs
User=blockbook-btg
ExecStart=/opt/coins/blockbook/bgold/bin/blockbook -blockchaincfg=/opt/coins/blockbook/bgold/config/blockchaincfg.json -datadir=/opt/coins/data/bgold/blockbook/db -sync -httpserver=:9035 -socketio=:9135 -certfile=/opt/coins/blockbook/bgold/cert/blockbook -explorer=https://btg-bitcore1.trezor.io/ -log_dir=/opt/coins/blockbook/bgold/logs
User=blockbook-bgold
Type=simple
Restart=on-failure
WorkingDirectory=/opt/coins/blockbook/btg
WorkingDirectory=/opt/coins/blockbook/bgold
# Resource limits
LimitNOFILE=500000

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -40,7 +40,7 @@ Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, coreutils, passwd, findutils, psmisc, bcash-testnet
Description: Satoshilabs blockbook server (Bitcoin Cash testnet)
Package: blockbook-btg
Package: blockbook-bgold
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, coreutils, passwd, findutils, psmisc, bgold-btg
Depends: ${shlibs:Depends}, ${misc:Depends}, coreutils, passwd, findutils, psmisc, bgold
Description: Satoshilabs blockbook server (Bitcoin Gold mainnet)

View File

@ -1,4 +1,5 @@
{
"coin_name": "Bgold",
"rpcURL": "http://127.0.0.1:8035",
"rpcUser": "rpc",
"rpcPass": "rpc",