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

finalni upravy pro klienta 2.1

parent fd867328
No related branches found
No related tags found
No related merge requests found
File mode changed from 100644 to 100755
warden-client-2.0
warden-client-2.1
File mode changed from 100644 to 100755
......@@ -140,18 +140,25 @@ make_warden_dir()
{
echo -n "Creating warden client directory ... "
test -d $prefix || mkdir -p prefix
if cp -R ${dirname}/warden-client $prefix 2> $err; then
if cp -R ${dirname}/warden-client $prefix 2> $err; then
echo "OK"
else
err_clean
fi
echo -n "Copying files ... "
files=(CHANGELOG INSTALL LICENSE README README.cesnet)
for file in ${files[@]};
do
cp ${dirname}/warden-client/doc/$file ${client_path}/doc
done
test -d ${client_path}/sh || mkdir -p ${client_path}/sh
cp ${dirname}/uninstall.sh ${client_path}/sh
echo "OK"
}
......@@ -203,6 +210,33 @@ make_conf_file()
# SSL_CA_FILE - path to CA certificate file
#-------------------------------------------------------------------------------
\$SSL_CA_FILE = \"${ca_file}\";
#-------------------------------------------------------------------------------
# MAX_RCV_EVENTS_LIMIT - maximum number of events the client is allowd to get
# from the Warden server in one batch
#-------------------------------------------------------------------------------
\$MAX_RCV_EVENTS_LIMIT = 6000; #consumes app. 250 MB of memory
#-------------------------------------------------------------------------------
# Log options
#
# LOG_STDERR, LOG_SYSLOG - hide (0) or allow (1) error reporting on STDERR
# and/or to Syslog
# LOG_STDERR_VERBOSE, LOG_SYSLOG_VERBOSE - print only error message without
# a stack (0) or print debug info
# including err. message and stack (1)
#-------------------------------------------------------------------------------
\$LOG_STDERR = 1;
\$LOG_SYSLOG = 0;
\$LOG_SYSLOG_FACILITY = \"local7\";
\$LOG_VERBOSE = 0;
1;
" > $conf_file 2> $err; ret_val=`echo $?`
if [ $ret_val -eq 0 ]; then
......
......@@ -6,7 +6,7 @@
#
# Use of this source is governed by a BSD-style license, see LICENSE file.
VERSION="2.0"
VERSION="2.1"
#-------------------------------------------------------------------------------
# FUNCTIONS
......@@ -126,12 +126,6 @@ uninstall_warden_client()
# MAIN
#-------------------------------------------------------------------------------
# OS test
os_chck
# Shell test
shell_chck
# read input
while getopts "d:Vh" options; do
case $options in
......@@ -156,6 +150,9 @@ obtain_package_version
echo
echo "------------------------- Uninstallation process --------------------------------"
# root check
root_chck
# check if $prefix/warden-client directory exist
warden_dir_chck
......
......@@ -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
......@@ -184,6 +184,28 @@ make_conf_file()
ssl_key_file=`cat $conf_file | grep '$SSL_KEY_FILE'`
ssl_cert_file=`cat $conf_file | grep '$SSL_CERT_FILE'`
ssl_ca_file=`cat $conf_file | grep '$SSL_CA_FILE'`
max_rcv_events_limit=`cat $conf_file | grep '$MAX_RCV_EVENTS_LIMIT'`
log_stderr=`cat $conf_file | grep '$LOG_STDERR'`
if [ -z $log_stderr ]; then
log_stderr="\$LOG_STDERR = 1;"
fi
log_syslog=`cat $conf_file | grep '$LOG_SYSLOG'`
if [ -z $log_syslog ]; then
log_syslog="\$LOG_SYSLOG = 0;"
fi
log_syslog_facility=`cat $conf_file | grep '$LOG_SYSLOG_FACILITY'`
if [ -z $log_syslog_facility ]; then
log_syslog_facility="\$LOG_SYSLOG_FACILITY = \"local7\";"
fi
log_verbose=`cat $conf_file | grep '$LOG_VERBOSE'`
if [ -z $log_verbose ]; then
log_verbose="\$LOG_VERBOSE = 0;"
fi
echo "#
# warden-client.conf - configuration file for the warden sender/receiver client
#
......@@ -207,6 +229,30 @@ $ssl_cert_file
# SSL_CA_FILE - path to CA certificate file
#-------------------------------------------------------------------------------
$ssl_ca_file
#-------------------------------------------------------------------------------
# MAX_RCV_EVENTS_LIMIT - maximum number of events the client is allowd to get
# from the Warden server in one batch
#-------------------------------------------------------------------------------
$max_rcv_events_limit
#-------------------------------------------------------------------------------
# Log options
#
# LOG_STDERR, LOG_SYSLOG - hide (0) or allow (1) error reporting on STDERR
# and/or to Syslog
# LOG_STDERR_VERBOSE, LOG_SYSLOG_VERBOSE - print only error message without
# a stack (0) or print debug info
# including err. message and stack (1)
#-------------------------------------------------------------------------------
$log_stderr
$log_syslog
$log_syslog_facility
$log_verbose
1;
" > $conf_file 2> $err; ret_val=`echo $?`
if [ $ret_val -eq 0 ]; then
......@@ -221,9 +267,6 @@ change_permissions()
{
echo -n "Changing permissions to updated package ... "
chown -R $user: $client_path 2>$err || err_clean
key_file=`echo $ssl_key_file | cut -d "\"" -f 2`
cert_file=`echo $ssl_cert_file | cut -d "\"" -f 2`
chmod 400 $key_file $cert_file || err_clean
chmod 644 $old_package_version_file || err_clean
if chmod 600 $conf_file; then
echo "OK"
......@@ -239,7 +282,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:Vh" options; do
......
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