Ajout : sauvegardes automatiques des bases postgresql.
[lhc/ateliers.git] / local / network-configure
index 5b412c6..be3e4b4 100755 (executable)
@@ -6,12 +6,15 @@ sudo install -m 644 -o root -g root /dev/stdin \
  /etc/hostname <<-EOF
        $vm
        EOF
  /etc/hostname <<-EOF
        $vm
        EOF
-grep -q " $vm\$" /etc/hosts ||
+ {
+       printf '%s\n' "$(cat /etc/hosts)"
+       grep -q " $vm\$" /etc/hosts ||
+       printf "%s\n" "127.0.0.1 $local_fqdn $vm"
+       grep -q " postgresql.$local_domainname\$" /etc/hosts ||
+       printf "%s\n" "127.0.0.1 postgresql.$local_domainname"
+ } |
 sudo install -m 644 -o root -g root /dev/stdin \
 sudo install -m 644 -o root -g root /dev/stdin \
- /etc/hosts <<-EOF
-       $(cat /etc/hosts)
-       127.0.0.1 $local_fqdn $vm
-       EOF
+ /etc/hosts
 sudo install -m 644 -o root -g root /dev/stdin \
  /etc/resolv.conf <<-EOF
        search ${local_host#*.}
 sudo install -m 644 -o root -g root /dev/stdin \
  /etc/resolv.conf <<-EOF
        search ${local_host#*.}