This looks fun! Wish I was there..
|
|||
This morning I successfully set up a clustered, high availability pair of Zimbra (VMware virtual) servers, synced with DRBD and using Heartbeat to failover to the secondary standby server. This is a howto that tries to cover *all* the steps, as there seems to be a great series of Howto's on the subject that in one way or another, leave something out with 'I am assuming you already (insert service here) working and will not cover this' clauses. In particular I ran into a few small hurdles with DRBD and hostnames and whatnot, so tried to document what I needed to do to make it work.
|
|||
I always wondered how scripts passed variables beginning with a '-', i.e 'foo.sh -q', or 'tar -zxfv' and so on. I knew that '$1' in bash takes the first extra variable sent at the shell, but that can be any sort of word, not specifically a '-' parameter. Does that make sense? Anyway, it turns out you can use this neat getopts function like so, with a case statement. This way you can also output a 'usage' mini-manual when a variable that is unrecognised, is passed: usage() { cat << EOF usage: $0 -option Use this script to rsync this to that :)
|
|||