backend binaries and configs are installed to dedicated directories

indexv1
Jakub Matys 2018-04-11 12:51:38 +02:00
parent cf27ed086b
commit 6c1e114074
16 changed files with 29 additions and 41 deletions

View File

@ -1 +1 @@
/data/btc/bitcoin/btc.conf
/opt/bitcoin/btc/btc.conf

View File

@ -1 +1,2 @@
btc.conf /data/btc/bitcoin
bitcoin/* /opt/bitcoin/btc
btc.conf /opt/bitcoin/btc

View File

@ -5,14 +5,14 @@
# See "man systemd.service" for details.
# Note that almost all daemon options could be specified in
# /data/btc/bitcoin/bitcoin.conf
# /opt/bitcoin/btc/btc.conf
[Unit]
Description=Bitcoin daemon (mainnet)
After=network.target
[Service]
ExecStart=/opt/satoshilabs/bitcoin/bin/bitcoind -datadir=/data/btc/bitcoin -conf=/data/btc/bitcoin/btc.conf -pid=/run/bitcoind/btc.pid
ExecStart=/opt/bitcoin/btc/bin/bitcoind -datadir=/data/btc/bitcoin -conf=/opt/bitcoin/btc/btc.conf -pid=/run/bitcoind/btc.pid
# Creates /run/bitcoind owned by bitcoin
RuntimeDirectory=bitcoind
User=bitcoin

View File

@ -1 +1 @@
/data/btc-testnet/bitcoin/btc-testnet.conf
/opt/bitcoin/btc-testnet/btc-testnet.conf

View File

@ -1 +1,2 @@
btc-testnet.conf /data/btc-testnet/bitcoin
bitcoin/* /opt/bitcoin/btc-testnet
btc-testnet.conf /opt/bitcoin/btc-testnet

View File

@ -5,14 +5,14 @@
# See "man systemd.service" for details.
# Note that almost all daemon options could be specified in
# /data/btc-testnet/bitcoin/bitcoin.conf
# /opt/bitcoin/btc-testnet/btc-testnet.conf
[Unit]
Description=Bitcoin daemon (testnet)
After=network.target
[Service]
ExecStart=/opt/satoshilabs/bitcoin/bin/bitcoind -datadir=/data/btc-testnet/bitcoin -conf=/data/btc-testnet/bitcoin/btc-testnet.conf -pid=/run/bitcoind/testnet.pid
ExecStart=/opt/bitcoin/btc-testnet/bin/bitcoind -datadir=/data/btc-testnet/bitcoin -conf=/opt/bitcoin/btc-testnet/btc-testnet.conf -pid=/run/bitcoind/testnet.pid
# Creates /run/bitcoind owned by bitcoin
RuntimeDirectory=bitcoind
User=bitcoin

View File

@ -1 +0,0 @@
bitcoin /opt/satoshilabs

View File

@ -1,2 +0,0 @@
/opt/satoshilabs/bitcoin/bin/bitcoind /usr/bin/bitcoind
/opt/satoshilabs/bitcoin/bin/bitcoin-cli /usr/bin/bitcoin-cli

View File

@ -2,20 +2,15 @@ Source: bitcoin
Section: satoshilabs
Priority: optional
Maintainer: jakub.matys@satoshilabs.com
Build-Depends: debhelper, wget, tar, gzip, make, dh-systemd
Build-Depends: debhelper, wget, tar, gzip, make, dh-systemd, dh-exec
Standards-Version: 3.9.5
Package: bitcoin
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Satoshilabs packaged bitcoin server (binaries)
Package: bitcoin-btc
Architecture: all
Depends: bitcoin (= ${binary:Version}), logrotate
Description: Satoshilabs packaged bitcoin server (configuration)
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, logrotate
Description: Satoshilabs packaged bitcoin server
Package: bitcoin-testnet
Architecture: all
Depends: bitcoin (= ${binary:Version}), logrotate
Description: Satoshilabs packaged bitcoin server (configuration)
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, logrotate
Description: Satoshilabs packaged bitcoin server

View File

@ -2,15 +2,10 @@ Source: zcash
Section: satoshilabs
Priority: optional
Maintainer: jakub.matys@satoshilabs.com
Build-Depends: debhelper, wget, tar, gzip, make, dh-systemd
Build-Depends: debhelper, wget, tar, gzip, make, dh-systemd, dh-exec
Standards-Version: 3.9.5
Package: zcash
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Satoshilabs packaged zcash server (binaries)
Package: zcash-zec
Architecture: all
Depends: zcash (= ${binary:Version}), logrotate
Description: Satoshilabs packaged zcash server (configuration)
Architecture: amd64
Depends: ${shlibs:Depends}, ${misc:Depends}, logrotate
Description: Satoshilabs packaged zcash server

View File

@ -1 +1 @@
/data/zec/zcash/zec.conf
/opt/zcash/zec/zec.conf

View File

@ -1 +1,2 @@
zec.conf /data/zec/zcash
zcash/* /opt/zcash/zec
zec.conf /opt/zcash/zec

View File

@ -14,7 +14,7 @@ case "$1" in
chown zcash:zcash /data/zec/zcash
fi
HOME=/data/zec/zcash /opt/satoshilabs/zcash/bin/zcash-fetch-params
HOME=/data/zec/zcash /opt/zcash/zec/bin/zcash-fetch-params
;;
esac

View File

@ -5,14 +5,15 @@
# See "man systemd.service" for details.
# Note that almost all daemon options could be specified in
# /data/zec/zcash/zcash.conf
# /opt/zcash/zec/zec.conf
[Unit]
Description=ZCash daemon (mainnet)
After=network.target
[Service]
ExecStart=/opt/satoshilabs/zcash/bin/zcashd -datadir=/data/zec/zcash -conf=/data/zec/zcash/zec.conf -pid=/run/zcashd/zec.pid
Environment="HOME=/data/zec/zcash"
ExecStart=/opt/zcash/zec/bin/zcashd -datadir=/data/zec/zcash -conf=/opt/zcash/zec/zec.conf -pid=/run/zcashd/zec.pid
# Creates /run/zcashd owned by zcash
RuntimeDirectory=zcashd
User=zcash
@ -38,7 +39,7 @@ NoNewPrivileges=true
PrivateDevices=true
# Deny the creation of writable and executable memory mappings.
MemoryDenyWriteExecute=true
# MemoryDenyWriteExecute=true
[Install]
WantedBy=multi-user.target

View File

@ -1 +0,0 @@
zcash /opt/satoshilabs

View File

@ -1,2 +0,0 @@
/opt/satoshilabs/zcash/bin/zcashd /usr/bin/zcashd
/opt/satoshilabs/zcash/bin/zcash-cli /usr/bin/zcash-cli