Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

shutdown script?
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
shutdown script?
4th Mar, 2016, 08:06 PM
Post: #1
Skywatch Offline
Registered
Posts: 1,018
Joined: Mar 2013
Reputation: 28
shutdown script?
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.
Find all posts by this user
Quote this message in a reply
4th Mar, 2016, 09:49 PM
Post: #2
Nachteule Offline
Administrator
******
Posts: 2,405
Joined: Dec 2014
Reputation: 122
RE: shutdown script?
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
Find all posts by this user
Quote this message in a reply
5th Mar, 2016, 12:14 AM
Post: #3
Skywatch Offline
Registered
Posts: 1,018
Joined: Mar 2013
Reputation: 28
RE: shutdown 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!).
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 22nd May, 2025, 12:33 AM Powered By MyBB, © 2002-2025 MyBB Group.