Skip to content
Snippets Groups Projects
Commit 1573b625 authored by Jan Soukal's avatar Jan Soukal
Browse files

zmeny verze 2.1 zohledneny do install.sh. Zmena nakladani s certifikaty a klici.

parent 2c214e7c
No related branches found
No related tags found
No related merge requests found
......@@ -63,7 +63,7 @@ B. Installation Dependencies
SOAP::Transport::HTTP >= 0.712
FindBin >= 1.50
DateTime >= 0.61
Carp >= 1.11
--------------------------------------------------------------------------------
C. Installation (First installation of the Warden client package)
......
......@@ -7,7 +7,7 @@
# Use of this source is governed by a BSD-style license, see LICENSE file.
VERSION="2.0"
VERSION="2.1"
#-------------------------------------------------------------------------------
# FUNCTIONS
......@@ -139,40 +139,40 @@ modules_chck()
make_warden_dir()
{
echo -n "Creating warden client directory ... "
test -d $prefix || mkdir -p $prefix
test -d $prefix || mkdir -p prefix
if cp -R ${dirname}/warden-client $prefix 2> $err; then
echo "OK"
else
err_clean
err_clean
fi
files=(CHANGELOG INSTALL LICENSE README README.cesnet)
for file in ${files[@]};
do
cp ${dirname}/$file ${client_path}/doc
cp ${dirname}/warden-client/doc/$file ${client_path}/doc
done
cp ${dirname}/uninstall.sh $client_path
cp ${dirname}/uninstall.sh ${client_path}/sh
}
copy_key()
check_key()
{
echo -n "Copying certificate key file ... "
if cp $key $etc 2> $err; then
echo -n "Checking certificate key file ... "
if su ${user} -c "test -r ${key}" 2> $err; then
echo "OK"
else
err_clean
echo "Warning: certificate key file is not readable by user ${user}!"
fi
}
copy_cert()
check_cert()
{
echo -n "Copying certificate file ... "
if cp $cert $etc 2> $err; then
echo -n "Checking certificate file ... "
if su ${user} -c "test -r ${key}" 2> $err; then
echo "OK"
else
err_clean
echo "Warning: certificate file is not readable by user ${user}!"
fi
}
......@@ -192,12 +192,12 @@ make_conf_file()
#-------------------------------------------------------------------------------
# SSL_KEY_FILE - path to client SSL certificate key file
#-------------------------------------------------------------------------------
\$SSL_KEY_FILE = \"${etc}/${key_file}\";
\$SSL_KEY_FILE = \"${key}\";
#-------------------------------------------------------------------------------
# SSL_CERT_FILE - path to client SSL certificate file
#-------------------------------------------------------------------------------
\$SSL_CERT_FILE = \"${etc}/${cert_file}\";
\$SSL_CERT_FILE = \"${cert}\";
#-------------------------------------------------------------------------------
# SSL_CA_FILE - path to CA certificate file
......@@ -217,7 +217,6 @@ change_permissions()
{
echo -n "Changing permissions to installed package ... "
chown -R $user: $client_path 2> $err || err_clean
chmod 400 ${etc}/$key_file ${etc}/$cert_file || err_clean
chmod 644 ${etc}/package_version || err_clean
if chmod 600 $conf_file; then
echo "OK"
......@@ -233,8 +232,7 @@ change_permissions()
#-------------------------------------------------------------------------------
# list of used Perl modules
modules=(SOAP::Lite IO::Socket::SSL SOAP::Transport::HTTP FindBin DateTime)
modules=(SOAP::Lite IO::Socket::SSL SOAP::Transport::HTTP FindBin DateTime Carp)
# read input
while getopts "d:u:k:c:a:Vh" options; do
case $options in
......@@ -286,10 +284,10 @@ echo "------------------------- Installation process --------------------------"
make_warden_dir
# copy cert key file
copy_key
check_key
# copy cert file
copy_cert
check_cert
# create conf file
make_conf_file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment