Skip to content

Commit

Permalink
Merge pull request #5813 from freedomofpress/5812-reboot-cron
Browse files Browse the repository at this point in the history
[Focal] Fix reboot-flag cron syntax
  • Loading branch information
conorsch authored Feb 23, 2021
2 parents da9dbf2 + dc54122 commit 9969993
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# The purpose of this cron is to drop the reboot-required flag every 12 hours
# to ensure the system is rebooted nightly, regardless of updates being installed
# or not.
* */12 * * * touch /var/run/reboot-required
0 */12 * * * root touch /var/run/reboot-required
2 changes: 1 addition & 1 deletion molecule/testinfra/common/test_automatic_updates.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def test_reboot_required_cron(host):
assert f.user == "root"
assert f.mode == 0o644

line = '^{}$'.format(re.escape("* */12 * * * touch /var/run/reboot-required"))
line = '^{}$'.format(re.escape("0 */12 * * * root touch /var/run/reboot-required"))
assert f.contains(line)


Expand Down

0 comments on commit 9969993

Please sign in to comment.