removed unneccesary single quote in sed command
This commit is contained in:
@@ -9,7 +9,7 @@ EXISTS=$(grep -w -F $SELECTOR $HOST_FILE);
|
|||||||
if [ -n "$EXISTS" ]; then
|
if [ -n "$EXISTS" ]; then
|
||||||
# selector already exists in hosts file and SCALE is not in use
|
# selector already exists in hosts file and SCALE is not in use
|
||||||
IP=$(echo $EXISTS | cut -d ' ' -f1);
|
IP=$(echo $EXISTS | cut -d ' ' -f1);
|
||||||
sed "s/'$IP'/'$HOMEASSISTANT_IP'/g" $HOST_FILE > /tmp/hosts.local
|
sed "s/$IP/$HOMEASSISTANT_IP/g" $HOST_FILE > /tmp/hosts.local
|
||||||
mv /tmp/hosts.local $HOST_FILE;
|
mv /tmp/hosts.local $HOST_FILE;
|
||||||
else
|
else
|
||||||
echo "'$HOMEASSISTANT_IP' '$SELECTOR'" >> $HOST_FILE
|
echo "'$HOMEASSISTANT_IP' '$SELECTOR'" >> $HOST_FILE
|
||||||
|
Reference in New Issue
Block a user