From f022ce99f22c6078566420a4a9145f0bf2bc743b Mon Sep 17 00:00:00 2001 From: reserve85 <111107925+reserve85@users.noreply.github.com> Date: Tue, 12 Mar 2024 07:14:44 +0100 Subject: [PATCH] add updatescript add update script (first version) usage: sudo chmod +x update.sh sudo ./update.sh --- update.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 update.sh diff --git a/update.sh b/update.sh new file mode 100644 index 0000000..2d95146 --- /dev/null +++ b/update.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +wget https://github.com/reserve85/HoymilesZeroExport/archive/refs/heads/main.zip +unzip main.zip +rm main.zip + +if [ $(dpkg-query -W -f='${Status}' rsync 2>/dev/null | grep -c "ok installed") -eq 0 ]; +then + apt-get install rsync; +fi + +rsync -a HoymilesZeroExport-main/ ./ +rm -r HoymilesZeroExport-main/ + +chmod +x install.sh + +./install.sh +./restart.sh \ No newline at end of file