From 1d929909ba9429c36ee92f3f4139dd8e3cf753f7 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 28 Oct 2017 17:16:08 +0100 Subject: [PATCH] Updating the social icon when a mesh peer goes online --- src/freedombone-image-customise | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/freedombone-image-customise b/src/freedombone-image-customise index b54d9eec..84c139f4 100755 --- a/src/freedombone-image-customise +++ b/src/freedombone-image-customise @@ -966,7 +966,15 @@ if [ \$no_of_users -gt 0 ]; then fi fi + add_social_icon= if [ ! -f /home/$MY_USERNAME/Desktop/social.desktop ]; then + add_social_icon=1 + else + if grep -q "Offline" /home/$MY_USERNAME/Desktop/social.desktop; then + add_social_icon=1 + fi + fi + if [ $add_social_icon ]; then echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/social.desktop echo 'Name=Social' >> /home/$MY_USERNAME/Desktop/social.desktop echo 'Name[el]=Κοινωνικός' >> /home/$MY_USERNAME/Desktop/social.desktop @@ -997,10 +1005,6 @@ if [ \$no_of_users -gt 0 ]; then echo 'Categories=Application;' >> /home/$MY_USERNAME/Desktop/social.desktop chmod +x /home/$MY_USERNAME/Desktop/social.desktop chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/Desktop/social.desktop - else - if grep -q "Offline" /home/$MY_USERNAME/Desktop/social.desktop; then - sed -i 's|Name=.*|Name=Social|g' /home/$MY_USERNAME/Desktop/social.desktop - fi fi #if [ ! -f /home/$MY_USERNAME/Desktop/audio.desktop ]; then