I would like to know if there is a way that the process of restarting the MPD using “/etc/init.d/mpd restart” can be automated at every startup.
I used to go the through a routine of just powering off the Voumio/Pi at the plug and then the next time I would go to use the device it would not play music, I then found that by using the above script it seemed to rectify this problem, however expecting my wife to log on using SSH and do this is not a good idea. I now always use the “Power Off” via the web interface before pulling the power to the Pi, however I was thinking more in case of power failure of just ever forgetting to follow my normal routine - it would certainly help the next time I came to use the device.
Is there any reason why this couldn’t be run once automatically after all the other PI’s functions are running to ensure a clean slate every time?
I’ve got a similar problem, when the power went down last night and now i can’t get into the web interface.
I’ve tried to add
sudo /etc/init.d/mpd restart &
to the
rc.local
above the
exit 0
line to prevent it from happening again.
but this doesn’t seem give me acces to the web interface.
when I ssh into the R-Pi, and execute
/etc/init.d/mpd restart
I get the following error: [ ok ] Stopping Music Player Daemon: mpd.
[....] Starting Music Player Daemon: mpdfailed to open log file "/var/log/mpd/mpd.log" (config line 11): Permission denied
failed!
is there any other way to fix the web interface?
edit
seems I had to login as root… to execute “mpd restart”
so i checked again what would happen if I just pulled the power. It broke the web interface again. is there another wat to execute “mod restart” on boot?