Hi folks,
I am struggling to get run_this_before_play_begins and run_this_after_play_ends options to work.
Basically, I am trying to start/stop automatically my amplifier (1968) via a Domoticz command triggering a 433mhz radio signal turning on/off a Chacon Plug (Domoticz part works perfectly fine).
But I can’t even get Shairport-Sync to start a simple script.
I modified the “session control” configuration options as follow (visible in both files /etc/shairport-sync.conf and /volumio/app/plugins/music_service/airplay_emulation/shairport-sync.conf.tmpl) :
sessioncontrol =
{
run_this_before_play_begins = "/usr/bin/mpc stop & /usr/bin/sudo /root/start_ampli.sh";
allow_session_interruption = "yes";
run_this_after_play_ends = "/usr/bin/sudo /root/stop_ampli.sh"
};
so far, my script is pretty dumb and works fine when executed as root through ssh command:
[code]#!/bin/sh
cp /dev/null standby.txt
date >> standby.txt
[/code]
Also, scripts belong to root in 777 mode.
Any idea of what I am doing wrong?