error in terminal shutdown commands

Cyborg_delta1

New Member
Joined
Sep 12, 2020
Messages
1
Reaction score
0
Credits
19
Hello

I have a setup where I have runeaudio on a Pi3 in a audio rack (call it Pi1) and use another Pi as just an interface (call this Pi2) in another location. Now to shut down both Pi's when I have finished with it I have created a bash script on Pi2 which will SSH to Pi1 tell it to stop playing, clear the playlist and shutdown then run a shutdown command on it self however I have ran into an issue.

If I tell Pi1 via ssh to "shutdown now" it will make the script hang on Pi2 and will not complete but if I use "shutdown +1" to delay the shutdown on Pi1 and allow the ssh connection to drop the script will bring back an error and Pi1 will remain on but the script will finish and Pi2 will shut down.

this is the error I get when I try to use anything but "shutdown now" I have also tried using sudo;

Failed to set wall message, ignoring: Unit systemd-logind.service is masked.
Failed to call ScheduleShutdown in logind, proceeding with immediate shutdown: Unit systemd-logind.service is masked.

Any one know how to get this to work your help will be much appreciated?
 


There's only one command that I know of that you could try.

sudo shutdown -h now
 

Members online


Top