From 772ff95108f56c98e453d4c6dba5aecf889b4f09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Aime?= Date: Thu, 10 Jun 2021 20:17:24 +0200 Subject: [PATCH] Updating the update script --- update.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/update.sh b/update.sh index 9dd6faa..c06ab5a 100644 --- a/update.sh +++ b/update.sh @@ -40,6 +40,10 @@ elif [ $PWD = "/tmp/tinycheck" ]; then cd /usr/share/tinycheck/app/frontend/ && npm install && npm audit fix && npm run build cd /usr/share/tinycheck/app/backend/ && npm install && npm audit fix && npm run build + echo "[+] Updating the database scheme..." + cd /usr/share/tinycheck/ + sqlite3 tinycheck.sqlite3 < assets/scheme.sql 2>/dev/null + echo "[+] Updating current configuration with new values." if ! grep -q reboot_option /usr/share/tinycheck/config.yaml; then sed -i 's/frontend:/frontend:\n reboot_option: true/g' /usr/share/tinycheck/config.yaml @@ -74,6 +78,9 @@ elif [ $PWD = "/tmp/tinycheck" ]; then service tinycheck-frontend restart service tinycheck-watchers restart + echo "[+] Deleting assets folder" + rm -rf /usr/share/tinycheck/assets/ + echo "[+] Updating the TinyCheck version" cd /tmp/tinycheck && git tag | tail -n 1 | xargs echo -n > /usr/share/tinycheck/VERSION