only write Jamulus ini file if not exist

This commit is contained in:
Volker Fischer 2019-09-23 19:57:28 +02:00
parent 068424ee14
commit 8a01fcadc9

View file

@ -66,10 +66,12 @@ ADEVICE=$(aplay -l|grep "USB Audio"|head -1|cut -d' ' -f3)
echo "Using USB audio device: ${ADEVICE}" echo "Using USB audio device: ${ADEVICE}"
# write Jamulus ini file for setting the client name # write Jamulus ini file for setting the client name
INIFILE="Jamulus.ini" JAMULUSINIFILE="Jamulus.ini"
NAME64=$(echo -n "Raspi $(hostname)"|base64) if [ ! -f "$HOME/.config/Jamulus/$JAMULUSINIFILE" ]; then
echo -e "<client>\n <name_base64>${NAME64}</name_base64>\n</client>" > ${INIFILE} NAME64=$(echo -n "Raspi $(hostname)"|base64)
mv ${INIFILE} ~/.config/Jamulus echo -e "<client>\n <name_base64>${NAME64}</name_base64>\n</client>" > ${JAMULUSINIFILE}
mv ${JAMULUSINIFILE} ~/.config/Jamulus
fi
# start Jack2 and Jamulus in headless mode # start Jack2 and Jamulus in headless mode
export LD_LIBRARY_PATH="distributions/${OPUS}/.libs:distributions/jack2/build:distributions/jack2/build/common" export LD_LIBRARY_PATH="distributions/${OPUS}/.libs:distributions/jack2/build:distributions/jack2/build/common"