Add global systemd services and use OnFailure by default
This commit is contained in:
parent
bb97797154
commit
00f034a9a8
20 changed files with 122 additions and 8 deletions
10
etc/systemd/system/check_updates.service
Normal file
10
etc/systemd/system/check_updates.service
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run check_updates
|
||||||
|
OnFailure=systemd_failure_notify@%n.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=check_updates
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
9
etc/systemd/system/check_updates.timer
Normal file
9
etc/systemd/system/check_updates.timer
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run check_updates
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=Mon *-*-* 05:00:00
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
10
etc/systemd/system/disk_space_alert.service
Normal file
10
etc/systemd/system/disk_space_alert.service
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run disk_space_alert
|
||||||
|
OnFailure=systemd_failure_notify@%n.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=disk_space_alert
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
9
etc/systemd/system/disk_space_alert.timer
Normal file
9
etc/systemd/system/disk_space_alert.timer
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run disk_space_alert
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=daily
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
10
etc/systemd/system/docker_check.service
Normal file
10
etc/systemd/system/docker_check.service
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run docker_check
|
||||||
|
OnFailure=systemd_failure_notify@%n.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=docker_check
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
9
etc/systemd/system/docker_check.timer
Normal file
9
etc/systemd/system/docker_check.timer
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run docker_check
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=*-*-* *:30:00
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
|
@ -1,6 +1,6 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Run docker_housekeeping
|
Description=Run docker_housekeeping
|
||||||
#OnFailure=systemd_failure_notify@%n.service
|
OnFailure=systemd_failure_notify@%n.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
|
10
etc/systemd/system/memory_usage_alert.service
Normal file
10
etc/systemd/system/memory_usage_alert.service
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run memory_usage_alert
|
||||||
|
OnFailure=systemd_failure_notify@%n.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=memory_usage_alert
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
9
etc/systemd/system/memory_usage_alert.timer
Normal file
9
etc/systemd/system/memory_usage_alert.timer
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run memory_usage_alert
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=hourly
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
10
etc/systemd/system/smartctl_tests_long.service
Normal file
10
etc/systemd/system/smartctl_tests_long.service
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run smartctl_tests_long
|
||||||
|
OnFailure=systemd_failure_notify@%n.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=smartctl_tests_long
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
9
etc/systemd/system/smartctl_tests_long.timer
Normal file
9
etc/systemd/system/smartctl_tests_long.timer
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run smart_ctl_tests_long
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=*-*-01 03:00:00
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
10
etc/systemd/system/systemd_check.service
Normal file
10
etc/systemd/system/systemd_check.service
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run systemd_check
|
||||||
|
OnFailure=systemd_failure_notify@%n.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=oneshot
|
||||||
|
ExecStart=systemd_check
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=default.target
|
9
etc/systemd/system/systemd_check.timer
Normal file
9
etc/systemd/system/systemd_check.timer
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Run systemd_check
|
||||||
|
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=*-*-* *:15:00
|
||||||
|
Persistent=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
|
@ -1,6 +1,6 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Run check_updates
|
Description=Run check_updates
|
||||||
#OnFailure=systemd_failure_notify@%n.service
|
OnFailure=systemd_failure_notify@%n.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Run disk_space_alert
|
Description=Run disk_space_alert
|
||||||
#OnFailure=systemd_failure_notify@%n.service
|
OnFailure=systemd_failure_notify@%n.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Run docker_check
|
Description=Run docker_check
|
||||||
#OnFailure=systemd_failure_notify@%n.service
|
OnFailure=systemd_failure_notify@%n.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Run dynv6
|
Description=Run dynv6
|
||||||
#OnFailure=systemd_failure_notify@%n.service
|
OnFailure=systemd_failure_notify@%n.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Run memory_usage_alert
|
Description=Run memory_usage_alert
|
||||||
#OnFailure=systemd_failure_notify@%n.service
|
OnFailure=systemd_failure_notify@%n.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Run smartctl_tests_long
|
Description=Run smartctl_tests_long
|
||||||
#OnFailure=systemd_failure_notify@%n.service
|
OnFailure=systemd_failure_notify@%n.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Run systemd_check
|
Description=Run systemd_check
|
||||||
#OnFailure=systemd_failure_notify@%n.service
|
OnFailure=systemd_failure_notify@%n.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
|
|
Loading…
Reference in a new issue