properly configure /etc/hosts
This commit is contained in:
@@ -16,6 +16,7 @@ set_hostname() {
|
|||||||
echo "Setting hostname to 'birdnetpi'"
|
echo "Setting hostname to 'birdnetpi'"
|
||||||
hostnamectl set-hostname birdnetpi
|
hostnamectl set-hostname birdnetpi
|
||||||
sed -i 's/raspberrypi/birdnetpi/g' /etc/hosts
|
sed -i 's/raspberrypi/birdnetpi/g' /etc/hosts
|
||||||
|
sed -i 's/localhost$/localhost birdnetpi.local/g' /etc/hosts
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ set_hostname() {
|
|||||||
echo "Setting hostname to 'birdnetpi'"
|
echo "Setting hostname to 'birdnetpi'"
|
||||||
hostnamectl set-hostname birdnetpi
|
hostnamectl set-hostname birdnetpi
|
||||||
sed -i 's/raspberrypi/birdnetpi/g' /etc/hosts
|
sed -i 's/raspberrypi/birdnetpi/g' /etc/hosts
|
||||||
|
sed -i 's/localhost$/localhost birdnetpi.local/g' /etc/hosts
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user