Skip to content

Commit

Permalink
add systemd service and timer for event cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
timogoebel authored and leewaa committed Jul 23, 2018
1 parent 5d2d644 commit 9636cba
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions contrib/systemd/foreman-dlm-expire-events.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Clean up expired Foreman DLM events
Documentation=https://github.com/dm-drogeriemarkt/foreman_dlm/blob/master/README.md
Requires=network.target

[Service]
Type=oneshot
EnvironmentFile=-/etc/sysconfig/foreman_dlm
ExecStart=/sbin/foreman-rake dlmlocks:expire
TimeoutSec=30m
8 changes: 8 additions & 0 deletions contrib/systemd/foreman-dlm-expire-events.timer
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Unit]
Description=Run foreman-dlm-expire-events.service nightly

[Timer]
OnCalendar=*-*-* 02:00:00

[Install]
WantedBy=timers.target

0 comments on commit 9636cba

Please sign in to comment.