home · contact · privacy
In server post-install script, set up hostname and FQDN.
authorChristian Heller <c.heller@plomlompom.de>
Wed, 30 Sep 2015 02:11:44 +0000 (04:11 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Wed, 30 Sep 2015 02:11:44 +0000 (04:11 +0200)
jessie_start_server.sh

index c21fa914e2830a406de582a5888064f153c5b9f0..4db22876333b3c25aaaef5386129d5042535ce3f 100755 (executable)
@@ -22,6 +22,12 @@ rm list_all_packages list_white_unsorted list_white list_black
 echo 'APT::Install-Recommends "false";' >> /etc/apt/apt.conf.d/99mindeps
 echo 'APT::Install-Suggests "false";' >> /etc/apt/apt.conf.d/99mindeps
 
+# Set hostname and FQDN.
+echo 'plomlompom' > /etc/hostname
+echo '127.0.0.1' > /etc/hosts
+ip=`hostname -I`
+echo "$ip plomlompom.com plomlompom" >> /etc/hosts
+
 # Call dhclient on startup.
 cat > /etc/systemd/system/dhclient.service << EOF
 [Unit]