summaryrefslogtreecommitdiffstats
path: root/move/tree/startkde_move
diff options
context:
space:
mode:
Diffstat (limited to 'move/tree/startkde_move')
-rwxr-xr-xmove/tree/startkde_move8
1 files changed, 8 insertions, 0 deletions
diff --git a/move/tree/startkde_move b/move/tree/startkde_move
index 9169add40..402803b5e 100755
--- a/move/tree/startkde_move
+++ b/move/tree/startkde_move
@@ -1,5 +1,13 @@
#!/bin/sh
+#- exit cleanly on SIGUSR1, so that our init can see a clean shutdown and automatically reboot
+reboot () {
+ touch /tmp/reboot
+ sudo killall X
+ exit 0
+}
+trap 'reboot' SIGUSR1
+
while true; do
wait4x || exit 1
xwait -permanent &