update to multiarch
This commit is contained in:
@@ -2,21 +2,19 @@
|
||||
|
||||
HOMEASSISTANT_DOMAIN="https://$DOMAIN";
|
||||
|
||||
if [ "$DOMAIN" == "localhost" ]; then
|
||||
|
||||
SELECTOR=$HOMEASSISTANT
|
||||
HOMEASSISTANT_IP=$(hostname -i | awk '{print $1}')
|
||||
HOST_FILE=/etc/system/data/dns/hosts.local;
|
||||
|
||||
EXISTS=$(grep -w -F $SELECTOR $HOST_FILE);
|
||||
if [ -n "$EXISTS" ]; then
|
||||
# selector already exists in hosts file and SCALE is not in use
|
||||
IP=$(echo $EXISTS | cut -d ' ' -f1);
|
||||
sed "s/$IP/$HOMEASSISTANT_IP/g" $HOST_FILE > /tmp/hosts.local
|
||||
mv /tmp/hosts.local $HOST_FILE;
|
||||
else
|
||||
echo "$HOMEASSISTANT_IP $SELECTOR" >> $HOST_FILE
|
||||
fi
|
||||
SELECTOR=$HOMEASSISTANT
|
||||
HOMEASSISTANT_IP=$(hostname -i | awk '{print $1}')
|
||||
HOST_FILE=/etc/system/data/dns/hosts.local;
|
||||
|
||||
EXISTS=$(grep -w -F $SELECTOR $HOST_FILE);
|
||||
if [ -n "$EXISTS" ]; then
|
||||
# selector already exists in hosts file and SCALE is not in use
|
||||
IP=$(echo $EXISTS | cut -d ' ' -f1);
|
||||
sed "s/$IP/$HOMEASSISTANT_IP/g" $HOST_FILE > /tmp/hosts.local
|
||||
mv /tmp/hosts.local $HOST_FILE;
|
||||
else
|
||||
echo "$HOMEASSISTANT_IP $SELECTOR" >> $HOST_FILE
|
||||
fi
|
||||
|
||||
mkdir -p /etc/user/data/homeassistant/config
|
||||
|
Reference in New Issue
Block a user