What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Script to restart daemon

aircoreboy

Regular Contributor
How would I go about creating a script to restart the mt-daapd daemon, to run after a router reboot ( i.e. stop the process, then start it again), and where would I put it?

I have been googling extensively, but alas, to no avail, I cannot seem to reconcile information I'm finding about Linux, with the router!
 
Last edited:
Search this forum, there are some threads about mt-daapd.
Also, to stop/start scripts look at the RMerlin docu. See the top sticky post in this forum for the links.
 
Thanks tlc, I did this;

#!/bin/sh
sleep 120
echo "Stop mt-daapd"
killall -9 mt-daapd
sleep 30
echo "Start mt-daapd"
mt-daapd -c tmp/etc/mt-daapd.conf

and put it inside services-start, seems to have done the trick!
 
You wanted to also properly shutdown when rebooting.
You could use services-stop in the same directory and add:
Code:
#!/bin/sh
echo "Stop mt-daapd"
killall -9 mt-daapd
If that helps. Not sure, have never used the services-stop to shutdown a script.
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top