mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-19 20:24:39 +02:00
Add fallback shutdown/reboot ...
This commit is contained in:
@@ -60,4 +60,17 @@ sync
|
|||||||
|
|
||||||
echo "starting shutdown ..."
|
echo "starting shutdown ..."
|
||||||
sudo shutdown ${shutdownParams}
|
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
|
exit 0
|
Reference in New Issue
Block a user