ES-DE/emulationstation.sh
2016-12-30 21:35:10 +00:00

22 lines
444 B
Bash
Executable file

#!/bin/sh
esdir="$(dirname $0)"
while true; do
rm -f /tmp/es-restart /tmp/es-sysrestart /tmp/es-shutdown
"$esdir/emulationstation" "$@"
ret=$?
[ -f /tmp/es-restart ] && continue
if [ -f /tmp/es-sysrestart ]; then
rm -f /tmp/es-sysrestart
sudo reboot
break
fi
if [ -f /tmp/es-shutdown ]; then
rm -f /tmp/es-shutdown
sudo poweroff
break
fi
break
done
exit $ret