From 6582c8b36f7b85488fadfb4d891417c31f3c8ff7 Mon Sep 17 00:00:00 2001 From: Stephan Oeste Date: Fri, 8 Jul 2022 11:12:25 +0200 Subject: [PATCH] Fix service name to elements and add elements testnet for prod install --- production/install | 25 +++++++++++++++++-- ...estnet.service => elements-liquid.service} | 6 ++--- ...service => elements-liquidtestnet.service} | 6 ++--- 3 files changed, 29 insertions(+), 8 deletions(-) rename production/linux/{elements-testnet.service => elements-liquid.service} (74%) rename production/linux/{elements.service => elements-liquidtestnet.service} (69%) diff --git a/production/install b/production/install index 0d19ec485..fd33a3e96 100755 --- a/production/install +++ b/production/install @@ -1285,7 +1285,25 @@ if [ "${ELEMENTS_LIQUID_ENABLE}" = ON ];then ;; Debian) - osSudo "${ROOT_USER}" install -c -o "${ROOT_USER}" -g "${ROOT_GROUP}" -m 644 "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/linux/liquid.service" "${DEBIAN_SERVICE_HOME}" + osSudo "${ROOT_USER}" install -c -o "${ROOT_USER}" -g "${ROOT_GROUP}" -m 644 "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/linux/elements-liquid.service" "${DEBIAN_SERVICE_HOME}" + ;; + esac +fi + +####################################### +# Bitcoin instance for Liquid Testnet # +####################################### + +if [ "${ELEMENTS_LIQUID_ENABLE}" = ON ];then + echo "[*] Installing Bitcoin Liquid service" + case $OS in + + FreeBSD) + echo "[*] FIXME: Bitcoin Liquid service must be installed manually on FreeBSD" + ;; + + Debian) + osSudo "${ROOT_USER}" install -c -o "${ROOT_USER}" -g "${ROOT_GROUP}" -m 644 "${MEMPOOL_HOME}/${MEMPOOL_REPO_NAME}/production/linux/elements-liquidtestnet.service" "${DEBIAN_SERVICE_HOME}" ;; esac fi @@ -1568,7 +1586,10 @@ case $OS in osSudo "${ROOT_USER}" systemctl enable bisq.service fi if [ "${ELEMENTS_LIQUID_ENABLE}" = ON ];then - osSudo "${ROOT_USER}" systemctl enable liquid.service + osSudo "${ROOT_USER}" systemctl enable elements-liquid.service + fi + if [ "${ELEMENTS_LIQUIDTESTNET_ENABLE}" = ON ];then + osSudo "${ROOT_USER}" systemctl enable elements-liquidtestnet.service fi ;; esac diff --git a/production/linux/elements-testnet.service b/production/linux/elements-liquid.service similarity index 74% rename from production/linux/elements-testnet.service rename to production/linux/elements-liquid.service index ff57c247b..0dd42e130 100644 --- a/production/linux/elements-testnet.service +++ b/production/linux/elements-liquid.service @@ -1,13 +1,13 @@ [Unit] -Description=Elementsd +Description=Elementsd-liquid After=network.target [Service] -ExecStart=/usr/local/bin/elementsd -daemon -printtoconsole -chain=liquidtestnet -pid=/elements/elements-testnet.pid +ExecStart=/usr/local/bin/elementsd -daemon -printtoconsole -chain=liquidv1 -pid=/elements/elements-liquid.pid ExecStop=/usr/local/bin/elements-cli stop Type=forking -PIDFile=/elements/elements-testnet.pid +PIDFile=/elements/elements-liquid.pid Restart=on-failure User=elements diff --git a/production/linux/elements.service b/production/linux/elements-liquidtestnet.service similarity index 69% rename from production/linux/elements.service rename to production/linux/elements-liquidtestnet.service index 84f79abaa..febefd7da 100644 --- a/production/linux/elements.service +++ b/production/linux/elements-liquidtestnet.service @@ -1,13 +1,13 @@ [Unit] -Description=Elementsd +Description=Elementsd-liquidtestnet After=network.target [Service] -ExecStart=/usr/local/bin/elementsd -daemon -printtoconsole -chain=liquidv1 -pid=/elements/elements.pid +ExecStart=/usr/local/bin/elementsd -daemon -printtoconsole -chain=liquidtestnet -pid=/elements/elements-liquidtestnet.pid ExecStop=/usr/local/bin/elements-cli stop Type=forking -PIDFile=/elements/elements.pid +PIDFile=/elements/elements-liquidtestnet.pid Restart=on-failure User=elements