fixes for second bind host
[distro-setup] / distro-end
index c97df5182dc131ebb983ce3802d4658a032e7e58..3772e87a3d189607c69ae4beebb0e3e9e2c92c61 100755 (executable)
@@ -27,6 +27,17 @@ end_msg() {
   IFS= read -r -d '' y  ||:
   end_msg_var+="$y"
 }
+end() {
+  e "$end_msg_var"
+  echo 0 >~/.local/distro-end
+  if $pending_reboot; then
+    echo "$0: pending reboot and then finished. doing it now."
+    s reboot now
+  else
+    echo "$0: $(date): ending now)"
+  fi
+  exit 0
+}
 die() {
   printf "$0: %s\n" "$*" >&2; exit 1
 }
@@ -53,7 +64,7 @@ s debconf-set-selections <<EOF
 popularity-contest popularity-contest/participate boolean true
 EOF
 
-########### begin section including li ################
+########### begin section including linode ################
 pi ${p2[@]}
 
 
@@ -394,16 +405,19 @@ EOF
 
 ###### begin website setup
 case $HOSTNAME in
-  li)
-
-    pi bind9
+  li|l2)
     f=/var/lib/bind/db.b8.nz
     if [[ ! -e $f ]]; then
       ser stop bind9
-      rm -f $f.jnl
-      install -m 644 -o bind -g bind /p/c/machine_specific/li/bind-initial/db.b8.nz $f
+      rm -f $f.jnl
+      s install -m 644 -o bind -g bind /p/c/machine_specific/linode/bind-initial/db.b8.nz $f
       ser restart bind9
     fi
+    ;;&
+  l2)
+    end
+    ;;
+  li)
 
     case $HOSTNAME in
       li) domain=iankelling.org ;;
@@ -553,10 +567,7 @@ EOF
     sgo znc
     ###### stop znc setup #####
 
-
-    echo 0 >~/.local/distro-end
-    echo "$0: $(date): ending now)"
-    exit 0
+    end
     ;;
 esac
 ###### end website setup
@@ -1670,7 +1681,6 @@ EOF
 fi
 
 
-e "$end_msg_var"
 
 
 
@@ -1684,11 +1694,4 @@ e "$end_msg_var"
 
 ######### begin stuff belonging at the end    ##########
 
-echo 0 >~/.local/distro-end
-if $pending_reboot; then
-  echo "$0: pending reboot and then finished. doing it now."
-  s reboot now
-else
-  echo "$0: $(date): ending now)"
-fi
-exit 0
+end