I usually shut down Volumio from the GUI. I’m guessing this shuts down the GUI, any non-GUI Volumio services and then runs the Linux command ‘shutdown’. I’m running Volumio on a Raspberry Pi and have just added a Witty Pi 3 Mini hat/board to provide a hardware on/off switch facility for the Pi. The Witty board has a push switch and a small controller which, when the switch is pressed, cleanly shuts down the Raspberry Pi and cuts the power to it (when the Witty is fitted the Pi gets its power via the Witty). As part of adding the Witty there are some shell scripts that are installed on the Pi(Volumio). One of these scripts (beforeShutdown.sh) is a “pre-shutdown” script which gets run before the Witty shuts down the Pi, and is the place for users to add their own shutdown commands. I’m guessing that I should add commands to this file to close the Volumio GUI and any Volumio specific services. So I’m looking for advice as to what command line commands I should add to “beforeShutdown.sh” to close the Volumio GUI and any Volumio specific services before the Witty does a standard/non-Volumio specific shutdown. Before you ask, I don’t know exactly what the Witty does/runs to shut down the Pi, but it won’t know the OS is Volumio rather than a standard Linux.
Regards,
Neil Mackie