--- /dev/null
+PATH=/usr/local/bin:/usr/bin:/bin
+*/2 root if dsa-is-shutdown-scheduled; then echo 'system-in-shutdown' > /srv/www/default.debian.org/htdocs/shutdown-in-progress ; else rm -f /srv/www/default.debian.org/htdocs/shutdown-in-progress; fi
--- /dev/null
+Alias /shutdown-in-progress /srv/www/default.debian.org/htdocs/shutdown-in-progress
content => template('apache2/ssl-key-pins.erb'),
notify => Exec['service apache2 reload'],
}
+
+ file { '/etc/cron.d/puppet-export-scheduled-shutdown':
+ source => 'puppet:///modules/apache2/cron-export-scheduled-shutdown',
+ }
+ apache2::config { 'local-scheduled-shutdown':
+ source => 'puppet:///modules/apache2/local-scheduled-shutdown',
+ }
}
--- /dev/null
+#!/bin/sh
+
+# sysvinit
+if /usr/lib/nagios/plugins/check_procs -w 1: -u root -C shutdown > /dev/null; then
+ exit 0
+fi
+# jessie
+if /usr/lib/nagios/plugins/check_procs -w 1: -u root -a /lib/systemd/systemd-shutdownd > /dev/null; then
+ exit 0
+fi
+# stretch
+if busctl get-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager ScheduledShutdown 2> /dev/null | awk '$3 > 0 { t=$3 } END { exit (t == 0)}'; then
+ exit 0
+fi
+exit 1
owner => root,
group => root,
}
+ file { '/usr/local/bin/dsa-is-shutdown-in-progress':
+ source => 'puppet:///modules/debian_org/dsa-is-shutdown-in-progress',
+ mode => '0555',
+ }
exec { 'dpkg-reconfigure tzdata -pcritical -fnoninteractive':
path => '/usr/bin:/usr/sbin:/bin:/sbin',
# if a system is running shutdown. We do not use check_nrpe's
# exit code as that does not reliably tell us if the check could
# not connect to the nrpe server or if the remote check returned not-null.
-command[dsa2_shutdown]=if /usr/lib/nagios/plugins/check_procs -w 1: -u root -C shutdown > /dev/null || /usr/lib/nagios/plugins/check_procs -w 1: -u root -a /lib/systemd/systemd-shutdownd > /dev/null || ( busctl get-property org.freedesktop.login1 /org/freedesktop/login1 org.freedesktop.login1.Manager ScheduledShutdown 2> /dev/null | awk '$3 > 0 { t=$3; } END { exit (t == 0)}' ); then echo 'system-in-shutdown'; else echo 'no shutdown running' ; fi
+command[dsa2_shutdown]=if /usr/local/bin/dsa-is-shutdown-scheduled; then echo 'system-in-shutdown'; else echo 'no shutdown running' ; fi
command[restart-ekey]=sudo /usr/sbin/service ekeyd-egd-linux restart
command[restart-samhain]=sudo /usr/sbin/service samhain restart
command[restart-ekey]=sudo /usr/sbin/service ekeyd-egd-linux restart