From beccc4be56bfe0bba4b72fbe143559e5ecb03181 Mon Sep 17 00:00:00 2001 From: openoms Date: Mon, 20 Jun 2022 07:35:41 +0100 Subject: [PATCH] tor: update to stable release w apt, restart CLN --- home.admin/config.scripts/tor.install.sh | 2 +- home.admin/config.scripts/tor.network.sh | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/home.admin/config.scripts/tor.install.sh b/home.admin/config.scripts/tor.install.sh index ca53acf9d..043b00e21 100755 --- a/home.admin/config.scripts/tor.install.sh +++ b/home.admin/config.scripts/tor.install.sh @@ -286,7 +286,7 @@ if [ "${action}" = "update" ]; then sudo systemctl start tor echo "# Installed $(tor --version)" ;; - *) sudo apt update -y && sudo apt upgrade -y tor;; + *) sudo apt update && sudo apt install tor && sudo systemctl restart tor;; esac echo exit diff --git a/home.admin/config.scripts/tor.network.sh b/home.admin/config.scripts/tor.network.sh index e4325f774..c3720aa93 100755 --- a/home.admin/config.scripts/tor.network.sh +++ b/home.admin/config.scripts/tor.network.sh @@ -199,15 +199,21 @@ EOF update) - /home/admin/config.scripts/tor.install.sh update source - if [ "$(sudo systemctl is-active lnd | grep -c "active")" -gt 0 ];then - echo "# LND needs to be restarted" + /home/admin/config.scripts/tor.install.sh update + if sudo systemctl is-active lnd ;then + echo "# LND will be restarted" sudo systemctl restart lnd sudo systemctl restart tlnd 2>/dev/null sudo systemctl restart slnd 2>/dev/null sleep 10 lncli unlock fi + if sudo systemctl is-active lightningd; then + echo "# CLN will be restarted" + sudo systemctl restart lightningd + sudo systemctl restart tlightningd 2>/dev/null + sudo systemctl restart slightningd 2>/dev/null + fi ;; *) usage