sffprimary

sffprimary

Show if a system is up or down or primary or secondary

    ALL parameters must be specified with a space separating the switch and data.
(eg -d edsysSender)
    Do not concatenate switches (ie -Vd... will NOT work)

    sffprimary
        default with no other parameters
        shows all Destinations for the system where you are running sffprimary
        return code is the number of valid entries displayed

    sffprimary (hostname)
        shows all Destinations for that Host

    sffprimary -d (PseudoHost Name)
    -d : return '0' if this is the Primary for this PseudoHost
        or  '1' if NOT
        or '-1' if the PseudoHost is NOT found (ie Destination in DEST_REDUN)
        The display and return code are the same except the return code is binary
        eg  sffprimary -d editorialwires

    sffprimary -D (PseudoHost Name)
    -D : return hostname of current system for this PseudoHost
        (ie Destination in DEST_REDUN)
        returns 'fip3' or blank if no-such-hostname
        The return code is -1= no-such-host or 1 host is fine
        sffprimary -D editorialwires

    sffprimary -a
    -a : just show the DEST_REDUN file on that system (including all comments)
    -A : just show the DEST_REDUN file currently in use on that system (just the
valid entries)

Others
    -h : second hostname for dual addressed systems
    -n : do not add a newline on the end of the line
    -N : only return the exit code NOT a display variable (for -d or -D only)
    -V : display internal workings for -d and -D
    -v : version and exit

Normally we add a NewLine After the string, use the '-n' input switch to strip.

Note that if you use 'echo' pls remember to NOT add a NL at the end.

Only other input parameter is -v : version and exit

Version Control
;001a   28apr14 chris cleanup
;000b   23mar05 chris original version

(copyright) 2017 and previous years FingerPost Ltd.