Skip to content

Commit

Permalink
Changed add nvram commit
Browse files Browse the repository at this point in the history
  • Loading branch information
vortex-5 committed Aug 14, 2020
1 parent 8105ae7 commit ed26676
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bwmon/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions bwmon/stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ed26676

Please sign in to comment.