diff --git a/bwmon/start.sh b/bwmon/start.sh index 9908d2d..9fb070b 100644 --- a/bwmon/start.sh +++ b/bwmon/start.sh @@ -56,12 +56,14 @@ echo "Cron Job Added Successfully DDWRT-BWMON is now running in the background." # Setup resume on reboot if [ "$1" != "auto" ]; then nvram set rc_startup=" -sleep 120 +sleep 60 $SCRIPT_DIR/start.sh auto " nvram set rc_shutdown=" $SCRIPT_DIR/stop.sh auto " +nvram commit + echo "Startup job set the router will auto-start this script on every reboot." fi diff --git a/bwmon/stop.sh b/bwmon/stop.sh index f34ff30..977c1e2 100644 --- a/bwmon/stop.sh +++ b/bwmon/stop.sh @@ -52,6 +52,7 @@ echo 'Bandwidth monitor shutdown completed.' if [ "$1" != "auto" ]; then nvram set rc_startup="" nvram set rc_shutdown="" +nvram commit echo 'This script will no longer auto-start on router startup.' fi