]> ### &version; - Initial release. mkdir -p &pluginLOC; find &pluginLOC; -maxdepth 1 -name 'wg-watchdog-*.txz' ! -name '&pkg;' -delete 2>/dev/null &github;/releases/download/&version;/&pkg; &md5; upgradepkg --install-new &pluginLOC;/&pkg; # Seed default config on first install -- never overwrite user changes if [ ! -f &pluginLOC;/wg-watchdog.cfg ]; then cp &emhttpLOC;/default.cfg &pluginLOC;/wg-watchdog.cfg fi # Ensure log exists so the View Log button doesn't 404 on first open touch /var/log/wg-watchdog.log chmod 0644 /var/log/wg-watchdog.log # Re-sync cron from current cfg (no-op if disabled) &emhttpLOC;/scripts/install_cron.sh echo "" echo "----------------------------------------------------------" echo " wg-watchdog &version; installed." echo " Configure under Tools -> User Utilities -> WireGuard Watchdog." echo " Default state: disabled. Set Enabled=yes to start checks." echo "----------------------------------------------------------" echo "" rm -f &pluginLOC;/wg-watchdog.cron /usr/local/sbin/update_cron 2>/dev/null removepkg &name; 2>/dev/null rm -rf &pluginLOC; rm -rf &emhttpLOC; echo "wg-watchdog removed (log preserved at /var/log/wg-watchdog.log)"