]> ##&name; ###2020.09.19 - Major overhaul! - Settings page update - Switch between stable and beta branch in settings page - Update rclone directly from the settings page as well as displaying current and newest version of rclone - Removal of standard scripts and script editing (Use User Scripts plugin instead) ###2019.11.01 - Ensure wrapper updating ###2019.10.23 - Make rclone wrapper branch agnostic ###2019.10.21 - Remove poorly documented logging option from rclone wrapper ###2019.10.14 - Fusermount compatibility fix take two ###2019.10.13b - Fusermount compatibility fix for future unRaid versions ###2019.10.13a - Icon change and small corrections ###2019.06.24 - Bump timeout again to alleviate problem with slow resolvers ###2019.02.07 - Change timeout to alleviate problem with slow resolvers ###2018.09.10c - Extra connectivity test ###2018.09.10a - Check if unpack was successful ###2018.09.10 - Test for internet connectivity - Retry mechanism for curl ###2018.08.25 - Let install survive when no internet connection on boot ###2017.09.23 - Always pull newest version on install ###2017.08.16 - New version of rclone (v1.37) ###2017.03.19 - New version of rclone (v1.36) ###2017.01.17a - Reverting previous patch ###2017.01.17 - Removed Wrapper ###2017.01.05 - New version of rclone (v1.35) ###2016.11.14 - Beta version of webgui - Beta version of included template scripts ###2016.11.08 - Fixed update routine ###2016.11.06 - First release of plugin for rclone stable branch - New version of rclone (v1.34) - Check to see if Beta branch installed ###2016.11.02 - More intuitive calling of rclone - Use rclone instead of myrclone - More minor changes in preperation of official release ###2016.10.31 - Minor improvements ###2016.10.28 - Removed cronjob ###2016.10.27 - Small modifications to make the plugin work again, and updateable from unraid interface if [ -d /usr/local/emhttp/plugins/rclone-beta ]; then echo "-----------------------------------------------------------------------------" echo "Migration update - Will remove old beta branch and install new unified plugin" echo "----------------- All config files and scripts will be kept -----------------" echo "-----------------------------------------------------------------------------" echo "" echo "-----------------------------------------------------------------------------" echo "Move Beta Config" echo "-----------------------------------------------------------------------------" mkdir -p /boot/config/plugins/rclone/install if [ -f /boot/config/plugins/rclone/.rclone.conf ]; then mv /boot/config/plugins/rclone/.rclone.conf /boot/config/plugins/rclone/.rclone.conf.stable_rename fi; cp /boot/config/plugins/rclone-beta/.rclone.conf /boot/config/plugins/rclone/.rclone.conf echo "" echo "-----------------------------------------------------------------------------" echo "Set Beta flag for new plugin" echo "-----------------------------------------------------------------------------" touch /boot/config/plugins/rclone/install/beta echo "" echo "-----------------------------------------------------------------------------" echo "Remove old beta plugin" echo "-----------------------------------------------------------------------------" rm -rf /boot/config/plugins/rclone-beta/install rm -f /usr/sbin/rcloneorig; rm -f /usr/sbin/rclone; rm -f /etc/ssl/certs/ca-certificates.crt removepkg 'rclone*' rm -rf /usr/local/emhttp/plugins/rclone-beta fi if ! [ -f /bin/fusermount ]; then if [ -f /usr/bin/fusermount3 ]; then ln -s /usr/bin/fusermount3 /bin/fusermount fi; fi; &bundleURL; &md5bundle; if [ -f /boot/config/plugins/rclone/install/beta ]; then rcloneurl="https://beta.rclone.org/rclone-beta-latest-linux-amd64.zip" else rcloneurl="https://downloads.rclone.org/rclone-current-linux-amd64.zip" fi; ping -q -c2 8.8.8.8 >/dev/null if [ $? -eq 0 ] then echo "Downloading rclone" curl --connect-timeout 15 --retry 3 --retry-delay 2 --retry-max-time 30 -o /boot/config/plugins/&name;/install/rclone-&rcloneversion;.zip $rcloneurl else ping -q -c2 1.1.1.1 >/dev/null if [ $? -eq 0 ] then echo "Downloading rclone" curl --connect-timeout 15 --retry 3 --retry-delay 2 --retry-max-time 30 -o /boot/config/plugins/&name;/install/rclone-&rcloneversion;.zip $rcloneurl else echo "No internet - Skipping download and using existing archives" fi fi; if [ -f /boot/config/plugins/&name;/install/rclone-&rcloneversion;.zip ]; then unzip /boot/config/plugins/&name;/install/rclone-&rcloneversion;.zip -d /boot/config/plugins/&name;/install/ rm -f $(ls /boot/config/plugins/&name;/install/rclone-&rcloneversion;.old.zip 2>/dev/null) mv /boot/config/plugins/&name;/install/rclone-&rcloneversion;.zip /boot/config/plugins/&name;/install/rclone-&rcloneversion;.old.zip elif [ -f /boot/config/plugins/&name;/install/rclone-&rcloneversion;.old.zip ]; then unzip /boot/config/plugins/&name;/install/rclone-&rcloneversion;.old.zip -d /boot/config/plugins/&name;/install/ else echo "Download failed - No existing archive found - Try again later" exit 1 fi; if [ -f /boot/config/plugins/&name;/install/rclone-v*/rclone ]; then rm -f $(ls /usr/sbin/rcloneorig 2>/dev/null) cp /boot/config/plugins/rclone/install/rclone-v*/rclone /usr/sbin/rcloneorig if [ "$?" -ne "0" ]; then echo "Copy failed - Please try installing/updating the plugin again" if [ -d /boot/config/plugins/&name;/install/rclone-v*/ ]; then rm -rf /boot/config/plugins/&name;/install/rclone-v*/ fi; rm -f $(ls /boot/config/plugins/&name;/install/rclone*.txz 2>/dev/null | grep -v '&bundleversion;') exit 1 fi; rm -f /usr/sbin/rclone else echo "Unpack failed - Please try installing/updating the plugin again" rm -f $(ls /boot/config/plugins/&name;/install/rclone-&rcloneversion;.old.zip 2>/dev/null) exit 1 fi; rm -f $(ls /boot/config/plugins/&name;/install/rclone*.txz 2>/dev/null | grep -v '&bundleversion;') if [ -d /boot/config/plugins/&name;/install/rclone-v*/ ]; then rm -rf /boot/config/plugins/&name;/install/rclone-v*/ fi; chown root:root /usr/sbin/rcloneorig chmod 755 /usr/sbin/rcloneorig if [ ! -f /boot/config/plugins/&name;/.rclone.conf ]; then touch /boot/config/plugins/&name;/.rclone.conf; fi; echo "" echo "-----------------------------------------------------------" echo " &name; has been installed." echo "-----------------------------------------------------------" echo "" rm -rf /boot/config/plugins/&name;/install rm -f /usr/sbin/rcloneorig; rm -f /usr/sbin/rclone; removepkg rclone-&bundleversion;-bundle >/dev/null rm -rf /usr/local/emhttp/plugins/&name; # we keep config and logs #rm -f /boot/config/plugins/&name;/.rclone.conf; #rm -f /boot/config/plugins/&name;/logs; echo "" echo "-----------------------------------------------------------" echo " &name; has been uninstalled." echo "-----------------------------------------------------------" echo "" #!/bin/bash config=/boot/config/plugins/&name;/.rclone.conf rcloneorig --config $config "$@";