Backslashes

This commit is contained in:
Bob Mottram 2017-10-06 12:51:46 +01:00
parent 5865f2633d
commit cb56cd94eb
1 changed files with 3 additions and 3 deletions

View File

@ -894,7 +894,7 @@ function configure_user_interface {
# Produce a text file on the desktop listing users on the mesh
cat <<EOF > $rootdir/usr/bin/list-tox-users
#!/bin/bash
ethernet_connected=$(cat /sys/class/net/eth0/carrier)
ethernet_connected=\$(cat /sys/class/net/eth0/carrier)
users_list=\$(lstox | awk -F ' ' '{\$1=""; print \$0}' | sed -e 's/^[[:space:]]*//' | sort -d | uniq)
if [ ! \$users_list ]; then
no_of_users=0
@ -1007,7 +1007,7 @@ if [ \$no_of_users -gt 0 ]; then
# If ethernet is connected then add the invite icon to help enable
# SSB nat traversal
if [[ "$ethernet_connected" != "0" ]]; then
if [[ "\$ethernet_connected" != "0" ]]; then
if [ ! -f /home/$MY_USERNAME/Desktop/invite.desktop ]; then
echo '[Desktop Entry]' > /home/$MY_USERNAME/Desktop/invite.desktop
echo 'Version=1.0' >> /home/$MY_USERNAME/Desktop/invite.desktop
@ -1054,7 +1054,7 @@ else
fi
# If there is no ethernet then remove the invite icon
if [[ "$ethernet_connected" == "0" ]]; then
if [[ "\$ethernet_connected" == "0" ]]; then
if [ -f /home/$MY_USERNAME/Desktop/invite.desktop ]; then
rm /home/$MY_USERNAME/Desktop/invite.desktop
fi