From 12500b63b98ffb646341758024e0ec41a2644221 Mon Sep 17 00:00:00 2001 From: Robin Kluth Date: Mon, 10 Apr 2023 16:27:25 +0200 Subject: [PATCH] 2023.04.10 --- appdata.backup.plg | 278 +++++++++++++-------------------- src/include/ABSettings.php | 2 +- src/pages/content/settings.php | 7 +- 3 files changed, 111 insertions(+), 176 deletions(-) diff --git a/appdata.backup.plg b/appdata.backup.plg index 536a0ca..f1cdf4c 100644 --- a/appdata.backup.plg +++ b/appdata.backup.plg @@ -1,191 +1,125 @@ - -To operate on an alternate directory, such as /mnt: - ROOT=/mnt upgradepkg package.txz - - + - - - + + + - + ]> - - - - -###2018.11.11 -- Add in autov routines + + - - - - - - -# Remove old 'source' files -rm -f $(ls /boot/config/plugins/&name;/&name;*.txz 2>/dev/null | grep -v '&version;') - - - - - -https://github.com/&github;/releases/download/v&version;/&name;-&version;-x86_64-1.txz -&md5; - - - - - -mkdir -p /tmp/ca.backup2/tempFiles -mkdir -p /var/lib/docker/unraid/ca.backup2.datastore -mkdir -p /boot/config/plugins/ca.backup2/ -rm -rf /usr/local/emhttp/plugins/ca.backup2/CA.page -rm -rf /usr/local/emhttp/plugins/ca.backup2/caHelp.page -/usr/local/emhttp/plugins/ca.backup2/scripts/removeCron.php -/usr/local/emhttp/plugins/ca.backup2/scripts/addCron.php -echo "" -echo "----------------------------------------------------" -echo " &name; has been installed." -echo " 2022-2023, Robin Kluth" -echo " 2015-2022, Andrew Zawadzki" -echo " Version: &version;" -echo "----------------------------------------------------" -echo "" - - - - - - -/usr/local/emhttp/plugins/ca.backup2/scripts/removeCron.php -removepkg &name;-&version;-x86_64-1 -rm -rf &plugdir; -rm -rf /boot/config/plugins/&name; - - + + + + + + echo "Checking some pre-install things..." + rm $(ls /boot/config/plugins/&name;/*.tgz 2>/dev/null | grep -v '&version;') + if [ -d "&plugdir;" ] + then + echo "Removing plugin files..." + rm -rf &plugdir; + else + echo "Plugin files were not present. Fresh install" + fi + echo "Creating plugin files directory..." + mkdir &plugdir; + + + + + https://github.com/&github;/releases/download/&version;/&name;-&version;.tgz + &sha256; + + + + + echo "Extracting plugin files..." + tar -C &plugdir; -xzf /boot/config/plugins/&name;/&name;-&version;.tgz 2>&1 + + + + + + php &plugdir;/scripts/checkCron.php + echo Adapting some things, because this is beta + rm &plugdir;/*.page + cp &plugdir;/pages/*.page &plugdir; + echo " BETA" >> &plugdir;/README.md + + + + + + echo "" + echo "----------------------------------------------------" + echo " &name; has been installed." + echo " (previously known as ca.backup2)" + echo "" + echo " 2022-2023, Robin Kluth" + echo " Version: &version;" + echo "----------------------------------------------------" + echo "" + + + + + + + echo "Uninstalling... ๐Ÿ˜ญ Maybe I see you again soon. Bye!" + php &plugdir;/scripts/checkCron.php --remove + rm -rf &plugdir; 2>/dev/null + rm -rf /boot/config/plugins/&name; + echo "Uninstall done." + + diff --git a/src/include/ABSettings.php b/src/include/ABSettings.php index 63798aa..d1ada30 100644 --- a/src/include/ABSettings.php +++ b/src/include/ABSettings.php @@ -13,7 +13,7 @@ class ABSettings { public static $pluginDir = '/boot/config/plugins/appdata.backup'; public static $settingsFile = 'config.json'; public static $cronFile = '/etc/cron.d/appdata_backup'; - public static $supportUrl = ''; + public static $supportUrl = 'https://forums.unraid.net/topic/137710-plugin-appdatabackup/'; public static $tempFolder = '/tmp/appdata.backup'; diff --git a/src/pages/content/settings.php b/src/pages/content/settings.php index 5f02012..84a3c52 100644 --- a/src/pages/content/settings.php +++ b/src/pages/content/settings.php @@ -619,9 +619,10 @@ class="fa fa-info"> Those must return exit code 0 for success detectionAndrew Zawadzki
Want to say "Thank You"?
-
Thanks! ๐Ÿ˜Š Thanks for using! You must know, we make those plugins - with โค๏ธ (and a lot of โ˜•). If you like, you can donate via PayPal. +
You're welcome! ๐Ÿ˜Š Thanks for using! We make those plugins + with โค๏ธ (and a lot of โ˜•). If you like the work, you can donate via PayPal.
GitHub repository