Forum

Full Version: shutdown script?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I would like the pi to play a mp3 on shutdown. Where would I put the command for this to happen?
I can do a start up one in rc.local, but what is the equivalent for shutting down in xbian please?

S.
I do not know if there is a already a standard procedure for shutdown (IMO not).

But, one way could be writing an upstart script which will be started on shutdown, reboot or both

cat /etc/init/down.conf
Code:
# Does anything at shutdown

# Only on shutdown
start on runlevel [0]
# Shutdown and reboot
#start on runlevel [06]

script
    # Do what you want here
    echo "Shutdown" >> var/log/shutdown.log
end script
Thanks for that, I will give that a try soon and see what happens....

S>

Having thought about it, couldn't I just use crontab to do this?
I live, I learn (but not always as fast as I need to!).
Reference URL's