add curl_scheduled role

This commit is contained in:
Sergey Malyuk
2025-12-16 12:24:14 +03:00
parent 64197142db
commit 400834cc3b
21 changed files with 365 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
[Unit]
Description=Run an HTTP request via curl designated '{{ label }}'
After=network.target
[Service]
Type=oneshot
ExecStart={{ curl_cmd }} {{ curl_args }} "{{ url }}"
Restart=no
# Security hardening
ProtectSystem=strict
NoNewPrivileges=true
PrivateTmp=true
ProtectKernelModules=true
ProtectControlGroups=true
ProtectKernelTunables=true
ProtectClock=yes
RestrictSUIDSGID=true
[Install]
WantedBy=multi-user.targer

View File

@@ -0,0 +1,12 @@
[Unit]
Description=Trigger a curl command designated '{{ label }}'
Requires=curl-{{ label }}.service
[Timer]
Unit=curl-{{ label }}.service
OnCalendar={{ schedule }}
AccuracySec=1m
Persistent=true
[Install]
WantedBy=timers.target