Skip to content

Commit

Permalink
Rename "bisq-seednode" service to "bisq" service
Browse files Browse the repository at this point in the history
  • Loading branch information
wiz committed Feb 6, 2020
1 parent 41a8fed commit dd2e8a6
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 34 deletions.
14 changes: 7 additions & 7 deletions seednode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,21 @@ After installation, watch the Bitcoin blockchain sync progress
sudo tail -f /bitcoin/debug.log
```

After Bitcoin is fully synced, start the bisq-seednode service
After Bitcoin is fully synced, start the bisq service
```bash
sudo systemctl start bisq-seednode
sudo journalctl --unit bisq-seednode --follow
sudo systemctl start bisq
sudo journalctl --unit bisq --follow
```

After Bisq is fully synced, check your Bitcoin and Bisq onion hostnames:
```bash
sudo -H -u bitcoin bitcoin-cli getnetworkinfo|grep address
sudo cat /bisq/bisq-seednode/btc_mainnet/tor/hiddenservice/hostname
sudo cat /bisq/bisq/btc_mainnet/tor/hiddenservice/hostname
```

### Testing

After your Bisq seednode is ready, test it by connecting to your new btcnode and bisq-seednode!
After your Bisq seednode is ready, test it by connecting to your new btcnode and bisq!

macOS:
```bash
Expand All @@ -72,8 +72,8 @@ git checkout v1.2.5 # new tag
./gradlew clean
./gradlew build -x test
exit
sudo service bisq-seednode restart
sudo journalctl --unit bisq-seednode --follow
sudo service bisq restart
sudo journalctl --unit bisq --follow
```

### Uninstall
Expand Down
8 changes: 4 additions & 4 deletions seednode/bisq-seednode.env → seednode/bisq.env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# env for bisq-seednode service
# install in /etc/default/bisq-seednode
# configuration for bisq service
# install in /etc/default/bisq.env

# java home, set to openjdk 10
JAVA_HOME=/usr/lib/jvm/openjdk-10.0.2
Expand All @@ -21,12 +21,12 @@ BITCOIN_RPC_PORT=__BITCOIN_RPC_PORT__
BITCOIN_RPC_BLOCKNOTIFY_HOST=127.0.0.1
BITCOIN_RPC_BLOCKNOTIFY_PORT=5120

# bisq seednode pathnames
# bisq pathnames
BISQ_HOME=__BISQ_HOME__
BISQ_APP_NAME=bisq-seednode
BISQ_BASE_CURRENCY=btc_mainnet

# bisq seednode settings
# bisq node settings
BISQ_NODE_PORT=8000
BISQ_MAX_CONNECTIONS=50
BISQ_MAX_MEMORY=4000
Expand Down
8 changes: 4 additions & 4 deletions seednode/bisq-seednode.service → seednode/bisq.service
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# install in /etc/systemd/system/bisq-seednode.service
# install in /etc/systemd/system/bisq.service

[Unit]
Description=Bisq Seed Node
Description=Bisq Node
After=bitcoin.service
#Requires=bitcoin.service
#BindsTo=bitcoin.service

[Service]
EnvironmentFile=/etc/default/bisq-seednode.env
EnvironmentFile=/etc/default/bisq.env

ExecStart=__BISQ_HOME__/__BISQ_REPO_NAME__/bisq-seednode \
ExecStart=__BISQ_HOME__/__BISQ_REPO_NAME__/__BISQ_APP_NAME__ \
--fullDaoNode=${BISQ_DAO_FULLNODE} \
--userDataDir=${BISQ_HOME} \
--appName=${BISQ_APP_NAME} \
Expand Down
35 changes: 18 additions & 17 deletions seednode/install_seednode_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ echo "[*] Installing Tor"
sudo -H -i -u "${ROOT_USER}" DEBIAN_FRONTEND=noninteractive apt-get install -qq -y ${TOR_PKG}

echo "[*] Installing Tor configuration"
sudo -H -i -u "${ROOT_USER}" install -c -m 644 "${ROOT_HOME}/${BISQ_REPO_NAME}/seednode/torrc" "${TOR_HOME}/torrc"
sudo -H -i -u "${ROOT_USER}" install -c -m 644 "${ROOT_HOME}/${BISQ_REPO_NAME}/bisq/torrc" "${TOR_HOME}/torrc"

if [ "${BITCOIN_INSTALL}" = true ];then

Expand Down Expand Up @@ -123,23 +123,24 @@ echo "[*] Installing OpenJDK 10.0.2 from Bisq repo"
sudo -H -i -u "${ROOT_USER}" "${BISQ_HOME}/${BISQ_REPO_NAME}/scripts/install_java.sh"

echo "[*] Installing Bisq init script"
sudo -H -i -u "${ROOT_USER}" install -c -o "${ROOT_USER}" -g "${ROOT_GROUP}" -m 644 "${BISQ_HOME}/${BISQ_REPO_NAME}/seednode/bisq-seednode.service" "${SYSTEMD_SERVICE_HOME}/bisq-seednode.service"
sudo -H -i -u "${ROOT_USER}" install -c -o "${ROOT_USER}" -g "${ROOT_GROUP}" -m 644 "${BISQ_HOME}/${BISQ_REPO_NAME}/seednode/bisq.service" "${SYSTEMD_SERVICE_HOME}/bisq.service"
if [ "${BITCOIN_INSTALL}" = true ];then
sudo sed -i -e "s/#Requires=bitcoin.service/Requires=bitcoin.service/" "${SYSTEMD_SERVICE_HOME}/bisq-seednode.service"
sudo sed -i -e "s/#BindsTo=bitcoin.service/BindsTo=bitcoin.service/" "${SYSTEMD_SERVICE_HOME}/bisq-seednode.service"
sudo sed -i -e "s/#Requires=bitcoin.service/Requires=bitcoin.service/" "${SYSTEMD_SERVICE_HOME}/bisq.service"
sudo sed -i -e "s/#BindsTo=bitcoin.service/BindsTo=bitcoin.service/" "${SYSTEMD_SERVICE_HOME}/bisq.service"
fi
sudo sed -i -e "s/__BISQ_REPO_NAME__/${BISQ_REPO_NAME}/" "${SYSTEMD_SERVICE_HOME}/bisq-seednode.service"
sudo sed -i -e "s!__BISQ_HOME__!${BISQ_HOME}!" "${SYSTEMD_SERVICE_HOME}/bisq-seednode.service"
sudo sed -i -e "s/__BISQ_REPO_NAME__/${BISQ_REPO_NAME}/" "${SYSTEMD_SERVICE_HOME}/bisq.service"
sudo sed -i -e "s!__BISQ_HOME__!${BISQ_HOME}!" "${SYSTEMD_SERVICE_HOME}/bisq.service"

echo "[*] Installing Bisq environment file with Bitcoin RPC credentials"
sudo -H -i -u "${ROOT_USER}" install -c -o "${ROOT_USER}" -g "${ROOT_GROUP}" -m 644 "${BISQ_HOME}/${BISQ_REPO_NAME}/seednode/bisq-seednode.env" "${SYSTEMD_ENV_HOME}/bisq-seednode.env"
sudo sed -i -e "s/__BITCOIN_P2P_HOST__/${BITCOIN_P2P_HOST}/" "${SYSTEMD_ENV_HOME}/bisq-seednode.env"
sudo sed -i -e "s/__BITCOIN_P2P_PORT__/${BITCOIN_P2P_PORT}/" "${SYSTEMD_ENV_HOME}/bisq-seednode.env"
sudo sed -i -e "s/__BITCOIN_RPC_HOST__/${BITCOIN_RPC_HOST}/" "${SYSTEMD_ENV_HOME}/bisq-seednode.env"
sudo sed -i -e "s/__BITCOIN_RPC_PORT__/${BITCOIN_RPC_PORT}/" "${SYSTEMD_ENV_HOME}/bisq-seednode.env"
sudo sed -i -e "s/__BITCOIN_RPC_USER__/${BITCOIN_RPC_USER}/" "${SYSTEMD_ENV_HOME}/bisq-seednode.env"
sudo sed -i -e "s/__BITCOIN_RPC_PASS__/${BITCOIN_RPC_PASS}/" "${SYSTEMD_ENV_HOME}/bisq-seednode.env"
sudo sed -i -e "s!__BISQ_HOME__!${BISQ_HOME}!" "${SYSTEMD_ENV_HOME}/bisq-seednode.env"
sudo -H -i -u "${ROOT_USER}" install -c -o "${ROOT_USER}" -g "${ROOT_GROUP}" -m 644 "${BISQ_HOME}/${BISQ_REPO_NAME}/seednode/bisq.env" "${SYSTEMD_ENV_HOME}/bisq.env"
sudo sed -i -e "s/__BITCOIN_P2P_HOST__/${BITCOIN_P2P_HOST}/" "${SYSTEMD_ENV_HOME}/bisq.env"
sudo sed -i -e "s/__BITCOIN_P2P_PORT__/${BITCOIN_P2P_PORT}/" "${SYSTEMD_ENV_HOME}/bisq.env"
sudo sed -i -e "s/__BITCOIN_RPC_HOST__/${BITCOIN_RPC_HOST}/" "${SYSTEMD_ENV_HOME}/bisq.env"
sudo sed -i -e "s/__BITCOIN_RPC_PORT__/${BITCOIN_RPC_PORT}/" "${SYSTEMD_ENV_HOME}/bisq.env"
sudo sed -i -e "s/__BITCOIN_RPC_USER__/${BITCOIN_RPC_USER}/" "${SYSTEMD_ENV_HOME}/bisq.env"
sudo sed -i -e "s/__BITCOIN_RPC_PASS__/${BITCOIN_RPC_PASS}/" "${SYSTEMD_ENV_HOME}/bisq.env"
sudo sed -i -e "s!__BISQ_APP_NAME__!${BISQ_APP_NAME}!" "${SYSTEMD_ENV_APP_NAME}/bisq.env"
sudo sed -i -e "s!__BISQ_HOME__!${BISQ_HOME}!" "${SYSTEMD_ENV_HOME}/bisq.env"

echo "[*] Checking out Bisq ${BISQ_LATEST_RELEASE}"
sudo -H -i -u "${BISQ_USER}" sh -c "cd ${BISQ_HOME}/${BISQ_REPO_NAME} && git checkout ${BISQ_LATEST_RELEASE}"
Expand All @@ -150,7 +151,7 @@ sudo -H -i -u "${BISQ_USER}" sh -c "cd ${BISQ_HOME}/${BISQ_REPO_NAME} && ./gradl
echo "[*] Updating systemd daemon configuration"
sudo -H -i -u "${ROOT_USER}" systemctl daemon-reload
sudo -H -i -u "${ROOT_USER}" systemctl enable tor.service
sudo -H -i -u "${ROOT_USER}" systemctl enable bisq-seednode.service
sudo -H -i -u "${ROOT_USER}" systemctl enable bisq.service
if [ "${BITCOIN_INSTALL}" = true ];then
sudo -H -i -u "${ROOT_USER}" systemctl enable bitcoin.service
fi
Expand All @@ -175,10 +176,10 @@ sudo -H -i -u "${ROOT_USER}" sh -c 'echo "Bisq Seednode instructions:" >> /etc/m
sudo -H -i -u "${ROOT_USER}" sh -c 'echo "https://github.com/bisq-network/bisq/tree/master/seednode" >> /etc/motd'
sudo -H -i -u "${ROOT_USER}" sh -c 'echo " " >> /etc/motd'
sudo -H -i -u "${ROOT_USER}" sh -c 'echo "How to check logs for Bisq-Seednode service:" >> /etc/motd'
sudo -H -i -u "${ROOT_USER}" sh -c 'echo "sudo journalctl --no-pager --unit bisq-seednode" >> /etc/motd'
sudo -H -i -u "${ROOT_USER}" sh -c 'echo "sudo journalctl --no-pager --unit bisq" >> /etc/motd'
sudo -H -i -u "${ROOT_USER}" sh -c 'echo " " >> /etc/motd'
sudo -H -i -u "${ROOT_USER}" sh -c 'echo "How to restart Bisq-Seednode service:" >> /etc/motd'
sudo -H -i -u "${ROOT_USER}" sh -c 'echo "sudo service bisq-seednode restart" >> /etc/motd'
sudo -H -i -u "${ROOT_USER}" sh -c 'echo "sudo service bisq restart" >> /etc/motd'

echo '[*] Done!'

Expand Down
4 changes: 2 additions & 2 deletions seednode/uninstall_seednode_debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ echo "[*] Uninstalling Bitcoin and Bisq, will delete all data!!"
sleep 10
sudo rm -rf /root/bisq
sudo systemctl stop bitcoin
sudo systemctl stop bisq-seednode
sudo systemctl stop bisq
sudo systemctl disable bitcoin
sudo systemctl disable bisq-seednode
sudo systemctl disable bisq
sudo userdel -f -r bisq
sudo userdel -f -r bitcoin
echo "[*] Done!"

0 comments on commit dd2e8a6

Please sign in to comment.