File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -45,8 +45,8 @@ MESSAGE="Denne computer lukker ned om fem minutter"
45
45
crontab -l > $ROOTCRON_TMP
46
46
crontab -u user -l > $USERCRON_TMP
47
47
48
- # Delete current crontab entries related to this script
49
- sed --in-place --expression " /rtcwake/d" --expression " /scheduled_off/d" $ROOTCRON_TMP
48
+ # Delete current crontab entries related to this script AND shutdown_at_time
49
+ sed --in-place --expression " /rtcwake/d" --expression " /scheduled_off/d" --expression " /shutdown/d " $ROOTCRON_TMP
50
50
sed --in-place " /lukker/d" $USERCRON_TMP
51
51
52
52
if [ " $1 " == " --off" ]; then
Original file line number Diff line number Diff line change @@ -36,8 +36,8 @@ MESSAGE="Denne computer lukker ned om fem minutter"
36
36
crontab -l > $ROOTCRON_TMP
37
37
crontab -u user -l > $USERCRON_TMP
38
38
39
- # Delete current crontab entries related to this script
40
- sed --in-place " /shutdown/d" $ROOTCRON_TMP
39
+ # Delete current crontab entries related to this script AND shutdown_and_wakeup.sh
40
+ sed --in-place --expression " /shutdown/d " --expression " /rtcwake/d " --expression " /scheduled_off /d" $ROOTCRON_TMP
41
41
sed --in-place " /lukker/d" $USERCRON_TMP
42
42
43
43
# If not called with --off: Determine the new crontab contents
You can’t perform that action at this time.
0 commit comments