Skip to content
Snippets Groups Projects
Commit 53e78ebb authored by Tomáš Plesník's avatar Tomáš Plesník
Browse files

pridan parametr -e pro nastaveni kontaktniho mailu na spravce Warden serveru

parent ba0dfe0f
No related branches found
No related tags found
No related merge requests found
......@@ -19,11 +19,12 @@ usage()
echo "-k <ssl_key_file> path to SSL certificate key file"
echo "-c <ssl_cert_file> path to SSL certificate file"
echo "-a <ssl_ca_file> path to CA certificate file"
echo "-e <e-mail address> e-mail address to Warden server administrator"
echo "-s <directory> directory for symlinks to Warden server control scripts (optional)"
echo "-h print this help"
echo "-V print script version number and exit"
echo
echo "Example: $ ./${0##*/} -d /opt/warden-server -k /etc/ssl/private/server.key -c /etc/ssl/certs/server.pem -a /etc/ssl/certs/tcs-ca-bundle.pem -s /usr/local/bin"
echo "Example: $ ./${0##*/} -d /opt/warden-server -k /etc/ssl/private/server.key -c /etc/ssl/certs/server.pem -a /etc/ssl/certs/tcs-ca-bundle.pem -e admin@domain.com -s /usr/local/bin"
echo
echo "For more information about installation process, see README file (section Installation)."
echo
......@@ -87,6 +88,10 @@ paramsChck()
echo "Parameter -a <ssl_ca_file> is not set!"
exit 1
fi
if [ -z "$contact" ]; then
echo "Parameter -e <e-mail address> is not set!"
exit 1
fi
}
......@@ -185,12 +190,13 @@ createSymlinks()
# MAIN
#-------------------------------------------------------------------------------
# read input
while getopts "d:k:c:a:s:Vh" options; do
while getopts "d:k:c:a:e:s:Vh" options; do
case "$options" in
d ) basedir="$OPTARG";;
k ) key_file="$OPTARG";;
c ) cert_file="$OPTARG";;
a ) ca_file="$OPTARG";;
e ) contact="$OPTARG";;
s ) symbin="$OPTARG";;
h ) usage;;
V ) version;;
......@@ -263,6 +269,7 @@ doTemplate \
echo -n "Creating Warden Watchdog configuration file ... "
doTemplate \
_HOSTNAME_ "$hostname" \
_CONTACT_ "$contact" \
< $watchdog_conf_tmpl \
> $watchdog_conf && echo "OK" || errClean
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment