From 8a01fcadc9c8f5d8d4673189443452013c1d62bf Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Mon, 23 Sep 2019 19:57:28 +0200 Subject: [PATCH] only write Jamulus ini file if not exist --- distributions/raspijamulus.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/distributions/raspijamulus.sh b/distributions/raspijamulus.sh index 82578bc3..e4f1d34b 100755 --- a/distributions/raspijamulus.sh +++ b/distributions/raspijamulus.sh @@ -66,10 +66,12 @@ ADEVICE=$(aplay -l|grep "USB Audio"|head -1|cut -d' ' -f3) echo "Using USB audio device: ${ADEVICE}" # write Jamulus ini file for setting the client name -INIFILE="Jamulus.ini" -NAME64=$(echo -n "Raspi $(hostname)"|base64) -echo -e "\n ${NAME64}\n" > ${INIFILE} -mv ${INIFILE} ~/.config/Jamulus +JAMULUSINIFILE="Jamulus.ini" +if [ ! -f "$HOME/.config/Jamulus/$JAMULUSINIFILE" ]; then + NAME64=$(echo -n "Raspi $(hostname)"|base64) + echo -e "\n ${NAME64}\n" > ${JAMULUSINIFILE} + mv ${JAMULUSINIFILE} ~/.config/Jamulus +fi # start Jack2 and Jamulus in headless mode export LD_LIBRARY_PATH="distributions/${OPUS}/.libs:distributions/jack2/build:distributions/jack2/build/common"