Skip to content

Commit

Permalink
fix autoreboot crontab not restart issue (coolsnowwolf#3770)
Browse files Browse the repository at this point in the history
  • Loading branch information
brucewzp authored Mar 13, 2020
1 parent abdf32b commit 103ba3b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions package/lean/luci-app-autoreboot/root/etc/init.d/autoreboot
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ run_reboot()
week="*"
fi
sed -i '/reboot/d' /etc/crontabs/root >/dev/null 2>&1
/etc/init.d/cron restart
echo "$minute $hour * * $week sleep 5 && touch /etc/banner && reboot" >> /etc/crontabs/root
echo "Auto REBOOT has started."
else
sed -i '/reboot/d' /etc/crontabs/root >/dev/null 2>&1
/etc/init.d/cron restart
echo "Auto REBOOT has started."
fi
}
Expand Down

0 comments on commit 103ba3b

Please sign in to comment.