I saw that there is a wall announcement made to all logged in users if there is a delay set, however I wish to be able to run a command before shutdown or ideally use a custom shutdown command.
AFAIK, I can't observe wall messages programatically and react to it. The machine runs headless, so it doesn't always have a user logged in.
My pi setup requires a specific shutdown command.
I saw that there is a
wall
announcement made to all logged in users if there is a delay set, however I wish to be able to run a command before shutdown or ideally use a custom shutdown command.AFAIK, I can't observe
wall
messages programatically and react to it. The machine runs headless, so it doesn't always have a user logged in.