diff --git a/home.admin/00settingsMenuServices.sh b/home.admin/00settingsMenuServices.sh index c3df1198..7b6a830f 100644 --- a/home.admin/00settingsMenuServices.sh +++ b/home.admin/00settingsMenuServices.sh @@ -507,7 +507,7 @@ if [ "${BTCPayServer}" != "${choice}" ]; then if [ "${choice}" = "on" ]; then if [ ${errorOnInstall} -eq 0 ]; then source /home/btcpay/.btcpayserver/Main/settings.config - if [ ${externalurl} = "https://localhost" ]; then + if [ "${externalurl}" = "https://localhost" ]; then localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/') externalurl="https://$localip\n Will need to accept the self-signed certificate in the \ @@ -546,7 +546,7 @@ if [ ${check} -eq 1 ]; then choice="on"; fi if [ "${lndmanage}" != "${choice}" ]; then echo "lndmanage Setting changed .." anychange=1 - sudo /home/admin/config.scripts/bonus.lndmanage.sh ${choice} + sudo -u admin /home/admin/config.scripts/bonus.lndmanage.sh ${choice} if [ "${choice}" = "on" ]; then whiptail --title " Installed lndmanage " --msgbox "\ Usage: https://github.com/bitromortac/lndmanage/blob/master/README.md\n diff --git a/home.admin/config.scripts/bonus.lndmanage.sh b/home.admin/config.scripts/bonus.lndmanage.sh index 204e328c..89093288 100644 --- a/home.admin/config.scripts/bonus.lndmanage.sh +++ b/home.admin/config.scripts/bonus.lndmanage.sh @@ -24,6 +24,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then echo "*** INSTALL LNDMANAGE ***" mkdir /home/admin/lndmanage + sudo chown admin:admin /home/admin/lndmanage cd /home/admin/lndmanage # activate virtual environment python -m venv venv