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

provedena revize kodu

parent d4647723
No related branches found
No related tags found
No related merge requests found
......@@ -38,21 +38,21 @@ VERSION="1.1.0"
#-------------------------------------------------------------------------------
usage()
{
echo "Usage: `basename $0` [-d <directory>] [-u <user>] [-k <ssl_key_file>] [-c <ssl_cert_file>] [-a <ssl_ca_file>] [-hV]"
echo "-d <directory> installation directory (default: /opt)"
echo "-u <user> owner of warden client package (user for running detection scripts)"
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 "-h print this help"
echo "-V print script version number and exit"
echo
echo "Example: ./`basename $0` -d /opt -u detector -k /etc/ssl/private/client.key -c /etc/ssl/certs/client.pem -a /etc/ssl/certs/tcs-ca-bundle.pem"
echo
echo "Note: You must be root for running this script."
echo " For more information about installation process, see README file (section Installation)."
echo
exit 0
echo "Usage: `basename $0` [-d <directory>] [-u <user>] [-k <ssl_key_file>] [-c <ssl_cert_file>] [-a <ssl_ca_file>] [-hV]"
echo "-d <directory> installation directory (default: /opt)"
echo "-u <user> owner of warden client package (user for running detection scripts)"
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 "-h print this help"
echo "-V print script version number and exit"
echo
echo "Example: ./`basename $0` -d /opt -u detector -k /etc/ssl/private/client.key -c /etc/ssl/certs/client.pem -a /etc/ssl/certs/tcs-ca-bundle.pem"
echo
echo "Note: You must be root for running this script."
echo " For more information about installation process, see README file (section Installation)."
echo
exit 0
}
......@@ -67,6 +67,7 @@ err()
{
echo "FAILED!"
cat $err
rm -rf $err
echo
echo "Installation FAILED!!!"
exit 1
......@@ -119,7 +120,7 @@ params_chck()
{
if [ -z $prefix ]; then
prefix=/opt
echo "Warning: parameter -d <directory> is not set - default installation directory is /opt!"
echo "Warning: parameter -d <directory> is not set - default installation directory is $prefix!"
fi
if [ -z $user ]; then
echo "Parameter -u <user> is not set!"
......@@ -148,6 +149,7 @@ perl_chck()
echo "OK"
else
echo "FAILED!"
echo "Error: Perl interpreter is not installed!"
exit 1
fi
}
......@@ -162,7 +164,7 @@ modules_chck()
if [ $ret_val -eq 0 ]; then
echo "OK"
else
err
err
fi
done
}
......@@ -184,13 +186,13 @@ installation_dir_chck()
make_warden_dir()
{
echo -n "Making warden client directory ... "
cp CHANGELOG INSTALL LICENSE README "$client_path/doc"
cp -R ./warden-client $prefix 2> $err; ret_val=`echo $?`
if [ $ret_val -eq 0 ]; then
echo "OK"
else
err_clean
fi
cp -u CHANGELOG INSTALL LICENSE README "$client_path/doc"
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment