Trauma writes

Hi, and thanks for this great piece of software.

While i’m trying to make upmpdcli and shairport-sync play/stop each other nicely, I’m failing to controlling shairport-sync with "onstop" or "onstart" directives :

Mar 19 21:47:48 cabinette upmpdcli[1245]: sh: /root/wlspk/ Permission denied
Mar 19 21:47:48 cabinette upmpdcli[1245]: :2:src/mpdcli.cxx:562::MPDCli::playId: /root/wlspk/ failed

and here is permissions of the script : `-rwxrwxrwx 1 upmpdcli audio 50 Mar 19 21:44 `

And the content of the highly elaborated script:


/usr/bin/shairport-sync -D && exit 0

In my fisrt attempt I’ve simply put onstart = "/usr/bin/shairport-sync -D" in upmpdcli.conf, didn’t got it to work neither :

Mar 19 21:22:30 cabinette upmpdcli[921]: sh: /usr/bin/shairport-sync -D: No such file or directory
Mar 19 21:22:30 cabinette upmpdcli[921]: :2:src/mpdcli.cxx:562::MPDCli::playId: "/usr/bin/shairport-sync -D" failed

While which shairport-sync gives : /usr/bin/shairport-sync

Any help on this would be greatly appreciated.

medoc92 writes

The perm denied is probably on one of the directories in the path /root/wlspk.

/root is usually drwx------

If this is the case, maybe create /home/upmpdcli with appropriate permissions ?

Trauma writes

Damn it! Of course…

Putting the script in a path with appropriate permissions and executing both process with same user did the trick!! My bad.

By the way, despite it’s actually working, upmpdcli still throw this errors :

Mar 21 20:50:07 cabinette upmpdcli[234]: :2:src/mpdcli.cxx:562::MPDCli::playId: /home/upmpdcli/ failed
Mar 21 20:50:24 cabinette upmpdcli[234]: :2:src/mpdcli.cxx:227::MPDCli::updStatus: /home/upmpdcli/ failed

And in the same situation, both process running with same user, with an upmpdcli configuration pointing directly to shairport-sync binary (in this case it really fails): Mar 21 20:56:22 cabinette upmpdcli[647]: :2:src/mpdcli.cxx:544::MPDCli::play: "/usr/bin/shairport-sync -D" failed


medoc92 writes

The messages just indicate that a system(3) call returned non-zero (I should print the value…). man system for the reasons why this may occur.

If the scripts otherwise do what they’re supposed to do, you should make sure that they set the exit status to 0.

Trauma writes

Once more you are totally right. The shairport-sync -R|D command always return 1.

Forcing exit code to 0 in the script fixed the log messages.

Thanks again for your support.