Add health check on debian-debug archive backends
[mirror/dsa-puppet.git] / modules / roles / templates / mirror-health.service.erb
index 6158951..60d9dcd 100644 (file)
@@ -4,15 +4,21 @@
 ##
 
 [Unit]
-Description=Mirror health checking <%= @healthcheck_service %>
+Description=Mirror health checking <%= @check_service %>
 
 [Service]
 ExecStart=/usr/local/sbin/mirror-health
-RuntimeDirectory=dsa-mirror-health-<%= @healthcheck_service %>
-DynamicUser=true
+RuntimeDirectory=dsa-mirror-health-<%= @check_service %>
+ProtectSystem=full
+ProtectHome=read-only
+PrivateTmp=true
+User=nobody
+Group=nogroup
+Restart=always
 
 Environment="MIRROR_CHECK_SERVICE=<%= @check_service %>"
 Environment="MIRROR_CHECK_URL=<%= @url %>"
+Environment="MIRROR_CHECK_HEALTH_URL=<%= @health_url %>"
 Environment="MIRROR_CHECK_HOSTS=<%= @check_hosts.join ' ' %>"
 Environment="MIRROR_CHECK_INTERVAL=<%= @check_interval %>"