mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-19 12:10:33 +02:00
Add fallback shutdown/reboot ...
This commit is contained in:
@@ -60,4 +60,17 @@ sync
|
||||
|
||||
echo "starting shutdown ..."
|
||||
sudo shutdown ${shutdownParams}
|
||||
|
||||
# detect missing DBUS
|
||||
if [ "${$DBUS_SESSION_BUS_ADDRESS}" == "" ]; then
|
||||
echo "WARN: Missing \$DBUS_SESSION_BUS_ADDRESS .. "
|
||||
if [ "$1" = "reboot" ]; then
|
||||
echo "RUNNING FALLBACK REBOOT .. "
|
||||
sudo systemctl --force --force reboot
|
||||
else
|
||||
echo "RUNNING FALLBACK SHUTDOWN .. "
|
||||
sudo systemctl --force --force poweroff
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
Reference in New Issue
Block a user