Skip to content

Commit

Permalink
hostname to hosts
Browse files Browse the repository at this point in the history
  • Loading branch information
MarlikAlmighty committed Dec 26, 2023
1 parent 555d2f6 commit 0610364
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ubuntu-server-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ echo "error while restart systemd-resolved, exit."
exit 1
fi

ufw enable -y
ufw allow ssh
ufw allow 8081/tcp
ufw allow 53/tcp
ufw allow 53/udp
ERR=$?
Expand All @@ -122,6 +125,9 @@ echo "error while rm -rf /tmp/mdns, exit."
exit 1
fi

# add hostname to /etc/hosts
echo $(hostname -I | cut -d\ -f1) $(hostname) | sudo tee -a /etc/hosts > /dev/null

echo "Done, mdns is installed."

exit 0

0 comments on commit 0610364

Please sign in to comment.