add curl_scheduled role
This commit is contained in:
21
roles/curl_scheduled/templates/placeholder.service
Normal file
21
roles/curl_scheduled/templates/placeholder.service
Normal 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
|
||||
12
roles/curl_scheduled/templates/placeholder.timer
Normal file
12
roles/curl_scheduled/templates/placeholder.timer
Normal 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
|
||||
Reference in New Issue
Block a user