Hello,
Im working on this for my RPi and everything is really nice. Im trying to make a script to automatically play a playlist with MPC and a service. I cant get the service to automatically start.
This is my xmas.sh code that starts the music fine on its own
#!/bin/sh
mpc clear
mpc load xmas
mpc play
mpc random on
echo "MUSIC IS OR SHOULD BE PLAYING"
I then chmoded it to 755 and made a service for it:
[Unit]
Description=Music
[Service]
Type=forking
ExecStartPre=/usr/bin/xmas.sh
ExecStart=/usr/bin/xmas.sh
ExecReload=/usr/bin/xmas.sh
ExecStop=/usr/bin/xmas.sh
[Install]
WantedBy=multi-user.target.want
I then tested it via systemctl start xmasv3.service and worked perfectly.
I then enabled it with systemctl enable xmasv3.service and rebooted the system shutdown -r 0
It would boot up to the login screen and nothing happens.
Can someone please help me? I don't mind starting fresh as there are a few files i've made and don't need. All I want it to do is auto play the playlist 'xmas' because the RPi will be on a timer so it wont have a proper shutdown, i think thats why it wont work? Im not bothered about sd effects from not having a proper shutdown.
Thanks,
Zac.
Debug log:
http://pastebin.com/qhh2bem4
(Ran out of characters here)