diff --git a/home.admin/config.scripts/bonus.btc-rpc-explorer.sh b/home.admin/config.scripts/bonus.btc-rpc-explorer.sh index 8d1371493..70370d3e3 100755 --- a/home.admin/config.scripts/bonus.btc-rpc-explorer.sh +++ b/home.admin/config.scripts/bonus.btc-rpc-explorer.sh @@ -4,6 +4,8 @@ # ~/.config/btc-rpc-explorer.env # https://github.com/janoside/btc-rpc-explorer/blob/master/.env-sample +VERSION="v3.3.0" + # command info if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then echo "# small config script to switch BTC-RPC-explorer on or off" @@ -79,6 +81,8 @@ fi # status if [ "$1" = "status" ]; then + echo "version='${VERSION}'" + if [ "${BTCRPCexplorer}" = "on" ]; then echo "configured=1" @@ -209,7 +213,7 @@ if [ "$1" = "install" ]; then cd /home/btcrpcexplorer sudo -u btcrpcexplorer git clone https://github.com/janoside/btc-rpc-explorer.git cd btc-rpc-explorer - sudo -u btcrpcexplorer git reset --hard v3.3.0 + sudo -u btcrpcexplorer git reset --hard ${VERSION} sudo -u btcrpcexplorer /home/admin/config.scripts/blitz.git-verify.sh "${PGPsigner}" "${PGPpubkeyLink}" "${PGPpubkeyFingerprint}" || exit 1 sudo -u btcrpcexplorer npm install if ! [ $? -eq 0 ]; then diff --git a/home.admin/config.scripts/bonus.btcpayserver.sh b/home.admin/config.scripts/bonus.btcpayserver.sh index a05f95a47..1826b21e3 100644 --- a/home.admin/config.scripts/bonus.btcpayserver.sh +++ b/home.admin/config.scripts/bonus.btcpayserver.sh @@ -94,6 +94,8 @@ explorer.postgres=User ID=nbxplorer;Host=localhost;Port=5432;Application Name=nb if [ "$1" = "status" ]; then + echo "version='${BTCPayVersion}'" + isInstalled=$(compgen -u | grep -c btcpay) echo "prepared=${isInstalled}" isActive=$(sudo ls /etc/systemd/system/btcpayserver.service 2>/dev/null | grep -c 'btcpayserver.service') diff --git a/home.admin/config.scripts/bonus.lnbits.sh b/home.admin/config.scripts/bonus.lnbits.sh index 8873174ea..3e68266ca 100644 --- a/home.admin/config.scripts/bonus.lnbits.sh +++ b/home.admin/config.scripts/bonus.lnbits.sh @@ -4,11 +4,12 @@ # https://github.com/lnbits/lnbits-legend/releases tag="0.9.4" +VERSION="${tag}" # command info if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then echo "Config script to switch LNbits on or off." - echo "Installs the version ${tag} by default." + echo "Installs the version ${VERSION} by default." echo "Usage:" echo "bonus.lnbits.sh [install|uninstall] [?GITHUBUSER] [?BRANCH|?TAG]" echo "bonus.lnbits.sh on [lnd|tlnd|slnd|cl|tcl|scl]" @@ -365,6 +366,8 @@ fi # status if [ "$1" = "status" ]; then + echo "version='${VERSION}'" + if [ "${LNBits}" = "on" ]; then echo "installed=1" diff --git a/home.admin/config.scripts/bonus.mempool.sh b/home.admin/config.scripts/bonus.mempool.sh index 05f789dca..446f565ba 100755 --- a/home.admin/config.scripts/bonus.mempool.sh +++ b/home.admin/config.scripts/bonus.mempool.sh @@ -66,6 +66,8 @@ fi # status if [ "$1" = "status" ]; then + echo "version='${pinnedVersion}'" + isInstalled=$(compgen -u | grep -c mempool) echo "codebase=${isInstalled}" diff --git a/home.admin/config.scripts/bonus.rtl.sh b/home.admin/config.scripts/bonus.rtl.sh index 01c4f685e..a32269ae1 100755 --- a/home.admin/config.scripts/bonus.rtl.sh +++ b/home.admin/config.scripts/bonus.rtl.sh @@ -66,6 +66,8 @@ if [ "$1" = "status" ] || [ "$1" = "menu" ]; then RTLHTTPS=$((RTLHTTP+1)) if [ "$1" = "status" ]; then + + echo "version='${RTLVERSION}'" echo "installed='${isInstalled}'" echo "localIP='${localip}'" echo "httpPort='${RTLHTTP}'" diff --git a/home.admin/config.scripts/bonus.template.sh b/home.admin/config.scripts/bonus.template.sh index ed2526385..a8585e403 100755 --- a/home.admin/config.scripts/bonus.template.sh +++ b/home.admin/config.scripts/bonus.template.sh @@ -10,13 +10,17 @@ # should be same as used in name if script APPID="template" # one-word lower-case no-specials +# clean human readable version - will be displayed in UI +# just numbers only seperated by dots (2 or 0.1 or 1.3.4 or 3.4.5.2) +VERSION="0.1" + # the git repo to get the source code from for install GITHUB_REPO="https://github.com/rootzoll/webapp-template" # the github tag of the version of the source code to install # can also be a commit hash # if empty it will use the latest source version -GITHUB_VERSION="v0.1" +GITHUB_TAG="v0.1" # the github signature to verify the author # leave GITHUB_SIGN_AUTHOR empty to skip verifying @@ -36,11 +40,11 @@ PORT_TOR_SSL="12348" # to see how you can deal with an app that installs multiple instances depending on # lightning implementation or testnets - but this should be OK for a start: if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then - echo "# bonus.${APPID}.sh status -> status information (key=value)" - echo "# bonus.${APPID}.sh on -> install the app" - echo "# bonus.${APPID}.sh off -> uninstall the app" - echo "# bonus.${APPID}.sh menu -> SSH menu dialog" - echo "# bonus.${APPID}.sh prestart -> will be called by systemd before start" + echo "# bonus.${APPID}.sh status -> status information (key=value)" + echo "# bonus.${APPID}.sh on -> install the app" + echo "# bonus.${APPID}.sh off -> uninstall the app" + echo "# bonus.${APPID}.sh menu -> SSH menu dialog" + echo "# bonus.${APPID}.sh prestart -> will be called by systemd before start" exit 1 fi @@ -76,8 +80,9 @@ fi # status information as a key=value list if [ "$1" = "status" ]; then echo "appID='${APPID}'" + echo "version='${VERSION}'" echo "githubRepo='${GITHUB_REPO}'" - echo "githubVersion='${GITHUB_VERSION}'" + echo "githubVersion='${GITHUB_TAG}'" echo "githubSignature='${GITHUB_SIGNATURE}'" echo "isInstalled=${isInstalled}" echo "isRunning=${isRunning}" @@ -197,10 +202,10 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then echo "# download the source code & verify" sudo -u ${APPID} git clone ${GITHUB_REPO} /home/${APPID}/${APPID} cd /home/${APPID}/${APPID} - sudo -u ${APPID} git reset --hard $GITHUB_VERSION + sudo -u ${APPID} git reset --hard $GITHUB_TAG if [ "${GITHUB_SIGN_AUTHOR}" != "" ]; then sudo -u ${APPID} /home/admin/config.scripts/blitz.git-verify.sh \ - "${GITHUB_SIGN_AUTHOR}" "${GITHUB_SIGN_PUBKEYLINK}" "${GITHUB_SIGN_FINGERPRINT}" "${GITHUB_VERSION}" || exit 1 + "${GITHUB_SIGN_AUTHOR}" "${GITHUB_SIGN_PUBKEYLINK}" "${GITHUB_SIGN_FINGERPRINT}" "${GITHUB_TAG}" || exit 1 fi # compile/install the app diff --git a/home.admin/config.scripts/bonus.thunderhub.sh b/home.admin/config.scripts/bonus.thunderhub.sh index af99abbfa..a50763f7f 100755 --- a/home.admin/config.scripts/bonus.thunderhub.sh +++ b/home.admin/config.scripts/bonus.thunderhub.sh @@ -32,6 +32,7 @@ if [ "$1" = "status" ] || [ "$1" = "menu" ]; then httpsPort="3011" if [ "$1" = "status" ]; then + echo "version='${THUBVERSION}'" echo "installed='${isInstalled}'" echo "localIP='${localip}'" echo "httpPort='${httpPort}'"