From 7db323f8a9ea3827a7ef53a4068e3b5ad200f60c Mon Sep 17 00:00:00 2001 From: Taylor Helsper Date: Mon, 12 Jul 2021 22:15:22 -0500 Subject: [PATCH] Add Netdata to app page --- .../standard/usr/bin/mynode_docker_images.sh | 17 ++++++++++++++++- rootfs/standard/usr/bin/mynode_startup.sh | 1 + .../bin/mynode_update_latest_version_files.sh | 1 + .../usr/share/mynode/application_info.json | 2 +- .../usr/share/mynode/mynode_app_versions.sh | 4 ++++ .../usr/share/mynode/netdata-compose.yml | 2 +- .../var/www/mynode/static/images/netdata.png | Bin 0 -> 5691 bytes 7 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 rootfs/standard/var/www/mynode/static/images/netdata.png diff --git a/rootfs/standard/usr/bin/mynode_docker_images.sh b/rootfs/standard/usr/bin/mynode_docker_images.sh index 01387533..b4365504 100755 --- a/rootfs/standard/usr/bin/mynode_docker_images.sh +++ b/rootfs/standard/usr/bin/mynode_docker_images.sh @@ -23,8 +23,23 @@ while true; do # Pull images that don't need to be built # ??? - # Upgrade WebSSH2 + # Upgrade Netdata + echo "Checking for new netdata..." + CURRENT="" + if [ -f $NETDATA_VERSION_FILE ]; then + CURRENT=$(cat $NETDATA_VERSION_FILE) + fi + if [ "$CURRENT" != "$NETDATA_VERSION" ]; then + docker rmi $(docker images --format '{{.Repository}}:{{.Tag}}' | grep 'netdata') || true + + docker pull netdata/netdata:${NETDATA_VERSION} + + echo $NETDATA_VERSION > $NETDATA_VERSION_FILE + fi + touch /tmp/need_application_refresh + + # Upgrade WebSSH2 echo "Checking for new webssh2..." WEBSSH2_UPGRADE_URL=https://github.com/billchurch/webssh2/archive/${WEBSSH2_VERSION}.tar.gz CURRENT="" diff --git a/rootfs/standard/usr/bin/mynode_startup.sh b/rootfs/standard/usr/bin/mynode_startup.sh index 69f750b5..a7307fb6 100755 --- a/rootfs/standard/usr/bin/mynode_startup.sh +++ b/rootfs/standard/usr/bin/mynode_startup.sh @@ -517,6 +517,7 @@ fi # Setup Netdata mkdir -p /opt/mynode/netdata cp -f /usr/share/mynode/netdata-compose.yml /opt/mynode/netdata/netdata-compose.yml +echo "NETDATA_VERSION=${NETDATA_VERSION}" > /opt/mynode/netdata/.env cp -f /usr/share/mynode/netdata.conf /opt/mynode/netdata/netdata.conf # Setup webssh2 diff --git a/rootfs/standard/usr/bin/mynode_update_latest_version_files.sh b/rootfs/standard/usr/bin/mynode_update_latest_version_files.sh index 54da63b6..e15ed9b1 100755 --- a/rootfs/standard/usr/bin/mynode_update_latest_version_files.sh +++ b/rootfs/standard/usr/bin/mynode_update_latest_version_files.sh @@ -27,6 +27,7 @@ echo $LNDCONNECT_VERSION > $LNDCONNECT_LATEST_VERSION_FILE echo $CKBUNKER_VERSION > $CKBUNKER_LATEST_VERSION_FILE echo $BOS_VERSION > $BOS_LATEST_VERSION_FILE echo $SPHINXRELAY_VERSION > $SPHINXRELAY_LATEST_VERSION_FILE +echo $NETDATA_VERSION > $NETDATA_LATEST_VERSION_FILE echo $WEBSSH2_VERSION > $WEBSSH2_LATEST_VERSION_FILE echo $PYBLOCK_VERSION > $PYBLOCK_LATEST_VERSION_FILE echo $WARDEN_VERSION > $WARDEN_LATEST_VERSION_FILE diff --git a/rootfs/standard/usr/share/mynode/application_info.json b/rootfs/standard/usr/share/mynode/application_info.json index 6a4e7379..8137f7cd 100644 --- a/rootfs/standard/usr/share/mynode/application_info.json +++ b/rootfs/standard/usr/share/mynode/application_info.json @@ -253,7 +253,7 @@ { "name": "Netdata", "short_name": "netdata", - "show_on_application_page": false + "can_reinstall": false }, { "name": "Tor", diff --git a/rootfs/standard/usr/share/mynode/mynode_app_versions.sh b/rootfs/standard/usr/share/mynode/mynode_app_versions.sh index 78dbea7b..6b83b9da 100644 --- a/rootfs/standard/usr/share/mynode/mynode_app_versions.sh +++ b/rootfs/standard/usr/share/mynode/mynode_app_versions.sh @@ -121,6 +121,10 @@ WARDEN_VERSION="0.91" WARDEN_VERSION_FILE=/home/bitcoin/.mynode/warden_version WARDEN_LATEST_VERSION_FILE=/home/bitcoin/.mynode/warden_version_latest +NETDATA_VERSION="v1.19.0" +NETDATA_VERSION_FILE=/mnt/hdd/mynode/settings/netdata_version +NETDATA_LATEST_VERSION_FILE=/mnt/hdd/mynode/settings/netdata_version_latest + WEBSSH2_VERSION="v0.2.10-0" WEBSSH2_VERSION_FILE=/mnt/hdd/mynode/settings/webssh2_version WEBSSH2_LATEST_VERSION_FILE=/mnt/hdd/mynode/settings/webssh2_version_latest diff --git a/rootfs/standard/usr/share/mynode/netdata-compose.yml b/rootfs/standard/usr/share/mynode/netdata-compose.yml index 6d650960..e105b14b 100644 --- a/rootfs/standard/usr/share/mynode/netdata-compose.yml +++ b/rootfs/standard/usr/share/mynode/netdata-compose.yml @@ -1,7 +1,7 @@ version: '3' services: netdata: - image: netdata/netdata:v1.19.0 + image: netdata/netdata:${NETDATA_VERSION} hostname: mynode.local # set to fqdn of host ports: - 19999:19999 diff --git a/rootfs/standard/var/www/mynode/static/images/netdata.png b/rootfs/standard/var/www/mynode/static/images/netdata.png new file mode 100644 index 0000000000000000000000000000000000000000..19303849e1880d4e3d7f1aa3ceaea33433317398 GIT binary patch literal 5691 zcmd5=`9G9v*nf<@8Z)L&Ne)9MN5__ia@J5|F8#6*8y2loe65gj-Ri)-W7H!qH@}-Iu2)x57b4^vgg!n; zgeQB?NkrGIBo0VIO)7FE2+e@XacBtw7SWVOkb+|5pkoL{NJ;|=l>a}UJW5UvC5ws# z*e33sk)`kbX2DU@9O|Ln>v@6e8STk#+e{vqtt;QYOM)f;`Vm=AYMar`vMGD}YLbVI z`GS6z{_?7xH15xOd6KT8^QHM?>S5}dn>kFv4}n!{re;)^s+@=Igs^gIn@T$?#61AT zHjF^A1BtXwOpenXxlx0hm1xuTH+UaTVf_;b0jCgi#B_eCz~D`_!1fZVRsjg)^k?<}`*J7-@?_`bDUg#@pY=gOi) zIy9y^S<+d3AbWQ(^$BlciiLhT;ZF1$N6qfTf^Q8lr#4Yq_mRWw z=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