debian/ha-sync.config
changeset 35 9439a824f71d
parent 1 b36b9eee9c41
equal deleted inserted replaced
34:1137e5b3bf0c 35:9439a824f71d
     1 #! /bin/sh
     1 #! /bin/bash
     2 
     2 
     3 set -e
     3 set -e
     4 . /usr/share/debconf/confmodule
     4 . /usr/share/debconf/confmodule
     5 
     5 
     6 # test "$1" = "purge" && { db_purge ha-sync/nodes; exit; }
     6 # test "$1" = "purge" && { db_purge ha-sync/nodes; exit; }
     7 
     7 
     8 # Hostname(s)
     8 # Hostname(s)
     9 
     9 
    10 db_input high ha-sync/dir || true
    10 db_input high ha-sync/dir || true
    11 
    11 
    12 HOSTNAME=${HOSTNAME%-*}
    12 HOSTNAME=${HOSTNAME%-[ab]}
    13 NODES="$HOSTNAME-a $HOSTNAME-b"
    13 NODES="$HOSTNAME-a $HOSTNAME-b"
    14 db_set ha-sync/nodes "$NODES"
    14 db_set ha-sync/nodes "$NODES"
    15 db_input high ha-sync/nodes || true
    15 db_input high ha-sync/nodes || true
    16 
    16 
    17 # Filesystems
    17 # Filesystems