chiark / gitweb /
units: kill the emergency shell with SIGHUP
authorLennart Poettering <lennart@poettering.net>
Thu, 8 Jul 2010 02:21:53 +0000 (04:21 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 8 Jul 2010 02:21:53 +0000 (04:21 +0200)
units/emergency.service

index 83b7d72..8745d10 100644 (file)
@@ -17,3 +17,7 @@ StandardInput=tty
 Restart=restart-always
 RestartSec=0
 KillMode=process-group
+
+# Bash ignores SIGTERM, so we send SIGHUP first, to ensure that bash
+# terminates cleanly.
+ExecStop=/bin/kill -HUP $(MAINPID)