]> Decide where every tile lives. Reorder and rename the categories on the Tools and Settings pages, create your own, move tiles (or whole categories) between Tools and Settings, hide what you never use, and optionally put everything on one unified page in the main menu. &pluginURL; &sha256; mkdir -p /boot/config/plugins/&name; # upgradepkg keeps whatever modes the archive had, so set them here chown -R root:root /usr/local/emhttp/plugins/&name; chmod -R 755 /usr/local/emhttp/plugins/&name; find /usr/local/emhttp/plugins/&name; -type f -exec chmod 644 {} \; chmod 755 /usr/local/emhttp/plugins/&name;/event/started # /usr/local/emhttp is RAM: a reboot or another plugin's update puts the original # menus back, so re-apply the saved layout every minute as well as at boot printf '%s\n' '* * * * * php -q /usr/local/emhttp/plugins/&name;/scripts/apply.php apply --quiet >/dev/null 2>&1' > /boot/config/plugins/&name;/&name;.cron # update_cron builds the crontab from the plugins registered in /var/log/plugins, and # Unraid only registers this one after these scripts have finished, so wait for that ( for i in $(seq 1 60); do if [ -e /var/log/plugins/&name;.plg ]; then /usr/local/sbin/update_cron; break; fi sleep 1 done ) >/dev/null 2>&1 </dev/null & php -q /usr/local/emhttp/plugins/&name;/scripts/apply.php apply --quiet rm -f $(ls /boot/config/plugins/&name;/&name;-*.txz 2>/dev/null | grep -v "&version;") echo "Menu Manager &version; installed" # give every tile back to where its plugin put it before the code goes away php -q /usr/local/emhttp/plugins/&name;/scripts/apply.php revert --quiet rm -f /boot/config/plugins/&name;/&name;.cron /boot/config/plugins/&name;/&name;-*.txz /usr/local/sbin/update_cron 2>/dev/null # Unraid does not forget the package on its own: without this, reinstalling the same # version before a reboot is skipped as "already installed" and installs nothing for pkg in /var/log/packages/&name;-*; do [ -e "$pkg" ] && removepkg "$(basename "$pkg")" >/dev/null 2>&1 done rm -rf /usr/local/emhttp/plugins/&name; # the saved layout (layout.json) is kept so a reinstall picks up where you left off