Skip to content

Commit

Permalink
add systemd service and timer
Browse files Browse the repository at this point in the history
  • Loading branch information
stendler committed May 7, 2023
1 parent 61b56b8 commit a18a55e
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
21 changes: 21 additions & 0 deletions container-check-update.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[Unit]
Description=Container update check
Requires=podman.socket
Wants=network-online.target
After=network-online.target
RequiresMountsFor=%t/containers

[Service]
Type=oneshot
ExecStart=/usr/bin/podman run --rm \
--volume=%t/podman:/run/podman:z \
--log-driver=journald \
--security-opt label=disable \
localhost/container-check-update
SuccessExitStatus=0 2

# Hardening
ProtectSystem=full
PrivateTmp=true
MemoryDenyWriteExecute=true
NoNewPrivileges=true
11 changes: 11 additions & 0 deletions container-check-update.timer
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Description=Daily container update check

[Timer]
OnCalendar=*-*-* 19:00:00
AccuracySec=1h
RandomizedDelaySec=5m
#Persistent=true

[Install]
WantedBy=timers.target

0 comments on commit a18a55e

Please sign in to comment.