Skip to content

Commit 831f72e

Browse files
committed
Be more explicit about exit codes.
1 parent 72a901a commit 831f72e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

macos-seatbelt/common.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,7 @@ function generate_launchctl_script(io::IO, brg::BuildkiteRunnerGroup;
227227
if ((ts_now - ts_boot > 24*60*60)); then
228228
echo "Rebooting machine after 24 hours of uptime"
229229
sudo -n /sbin/shutdown -r now
230-
231-
# Give the system the time to shut down,
232-
# preventing a new job from getting picked up
233-
sleep 30
230+
break
234231
fi
235232
""")
236233

@@ -242,6 +239,9 @@ function generate_launchctl_script(io::IO, brg::BuildkiteRunnerGroup;
242239
break
243240
fi
244241
done
242+
243+
# Return success, which will result in the service _not_ restarting
244+
exit 0
245245
""")
246246
end
247247

0 commit comments

Comments
 (0)