]> ##&name; ###&version; - Fix: PANIC: assert failed. ### fork from https://github.com/dlandon/recycle.bin "&gitURL;/&name;-&version;.tgz" &MD5; # Stop the recycle bin if it is running if [ -e /var/run/&name;.pid ]; then # Stop recycle bin. /usr/local/emhttp/plugins/&name;/scripts/rc.&name; stop 2>/dev/null disown # Show that the recycle bin was already running echo "" > /tmp/&name;/started fi # Remove old cron files. rm -rf /boot/config/plugins/dynamix/share_exclude.cron # Remove emhttp files so we can re-install. rm -rf /usr/local/emhttp/plugins/&name;/* 2>/dev/null # Remove old 'bundle' files. rm -f $(ls /boot/config/plugins/&name;/&name;*.tgz 2>/dev/null | grep -v '&version;') # Install the 'bundle'. tar -xf /boot/config/plugins/&name;/&name;-&version;.tgz -C /usr/local/emhttp/plugins 2>/dev/null # Fix permissions of executable files chmod +x /usr/local/emhttp/plugins/&name;/scripts/* /usr/local/emhttp/plugins/&name;/event/* # Restart the recycle bin if it was already running if [ -f /tmp/&name;/started ]; then # Start recycle bin. /usr/local/emhttp/plugins/&name;/scripts/rc.&name; start 2>/dev/null disown # Remove started status file rm -rf /tmp/&name;/started fi echo "" echo "-----------------------------------------------------------" echo " &name; has been installed." echo " Copyright 2015-2025 &author;" echo " Version: &version;" echo "-----------------------------------------------------------" echo "" # Stop the recycle bin if it is running if [ -e /var/run/&name;.pid ]; then # Stop recycle bin in the background. /usr/local/emhttp/plugins/&name;/scripts/rc.&name; stop 2>/dev/null fi # Remove plugin files from emhttp. rm -rf /usr/local/emhttp/plugins/&name; 2>/dev/null # Remove the recycle bin bundle so it will be downloaded if re-installed. rm -rf /boot/config/plugins/&name;/&name;-&version;.tgz # Remove RecycleBin browse symlinks. rm -rf /mnt/RecycleBin # Remove the pid file. rm -rf /var/run/&name;.pid 2>/dev/null # Remove the tmp directory. rm -rf /tmp/&name; 2>/dev/null echo "" echo "-----------------------------------------------------------" echo " &name; has been removed." echo " Version: &version;" echo "-----------------------------------------------------------" echo ""