From b4e86e58113805db13372e6223fecc44637ed775 Mon Sep 17 00:00:00 2001 From: KM4ACK Date: Thu, 27 Jul 2023 08:28:53 -0500 Subject: [PATCH] auto set card names --- app/stable/x86_64/CONKY.bapp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/stable/x86_64/CONKY.bapp b/app/stable/x86_64/CONKY.bapp index db756e1..86d1cf6 100755 --- a/app/stable/x86_64/CONKY.bapp +++ b/app/stable/x86_64/CONKY.bapp @@ -31,6 +31,15 @@ INSTALL(){ cp -r ${BAPDIR}/data/conky/ ${HOME}/bin/ cp ${HOME}/bin/conky/default.86 ${HOME}/.conkyrc sed -i "s/N0CALL/${BAPCALL}/" ${HOME}/.conkyrc + #set wifi/eth card names in .conkyrc file + WIFI=$(nmcli --get-values GENERAL.DEVICE,GENERAL.TYPE device show | grep -B1 wifi | sed '/wifi/d' | head -1) + ETH=$(nmcli --get-values GENERAL.DEVICE,GENERAL.TYPE device show | grep -B1 ethernet | sed '/ethernet/d' | head -1) + if [ -n "$WIFI" ]; then + sed -i "s/wlan0/${WIFI}/" ${HOME}/.conkyrc + fi + if [ -n "$ETH" ]; then + sed -i "s/eth0/${ETH}/" ${HOME}/.conkyrc + fi #Line below is for https://github.com/km4ack/pi-build/issues/198 echo "#Update GPS maidenhead for conky" >>${TEMPCRON} echo "*/1 * * * * /home/`whoami`/bin/conky/grid" >>${TEMPCRON}