]> OLDVERS=$(ls /boot/config/plugins/&name;/*.tgz 2>/dev/null | grep -v '&version;') if [ ! -z "$OLDVERS" ] then echo "Cleaning old archives..." rm $OLDVERS else echo "No cleanup of old plugin archive needed!" fi 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 # Because we used the wrong way for reloading cron, we should remove the old remnants... if [ -f "/etc/cron.d/appdata_backup_beta" ]; then rm /etc/cron.d/appdata_backup_beta echo "Found old cron file, refreshing it..." fi php &plugdir;/scripts/checkCron.php echo Adapting some things, because this is beta rm &plugdir;/*.page cp &plugdir;/pages/*.page &plugdir;/pages/README.md &plugdir; echo -n "&version;" > &plugdir;/version 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!" rm -rf &plugdir; 2>/dev/null rm -rf /boot/config/plugins/&name; update_cron # Let cron know, we removed the target files :P echo "Uninstall done."