4.3.0r13
[enigma2.git] / usr / bin / enigma2-system-state
1 #!/bin/sh
2 if [ -f /run/enigma2/system-state ]; then
3         state=`cat /run/enigma2/system-state`
4         case "$state" in
5                 "system-restart")
6                         systemctl --no-block reboot
7                         ;;
8                 "system-standby")
9                         systemctl --no-block poweroff
10                         ;;
11                 "ui-restart")
12                         ;;
13                 "system-recovery")
14                         echo "rescue" > /proc/stb/fp/boot_mode
15                         systemctl --no-block reboot
16                         ;;
17         esac
18         rm -f /run/enigma2/system-state
19 fi