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

upravy pro finalni balicek warden-server-2.0

parent fd41c0dc
No related branches found
No related tags found
No related merge requests found
......@@ -24,7 +24,7 @@ err()
#-------------------------------------------------------------------------------
# edit when you build new package
version="2.0.0-beta"
version="2.0"
package_name="warden-server"
package="${package_name}-${version}"
......
#!/bin/bash
#
# getStatus.pl
#
# Copyright (C) 2011-2012 Cesnet z.s.p.o
#
# Use of this source is governed by a BSD-style license, see LICENSE file.
VERSION='2.0'
if [ $UID -ne 0 ]; then
echo "You must be root for running this script!"
exit 1
fi
DB_NAME=`cat /opt/warden-server/etc/warden-server.conf | grep '$DB_NAME' | sed 's/[";]//g' |awk '{print $3}'`
DB_USER=`cat /opt/warden-server/etc/warden-server.conf | grep '$DB_USER' | sed 's/[";]//g' |awk '{print $3}'`
DB_PASS=`cat /opt/warden-server/etc/warden-server.conf | grep '$DB_PASS' | sed 's/[";]//g' |awk '{print $3}'`
DB_HOST=`cat /opt/warden-server/etc/warden-server.conf | grep '$DB_HOST' | sed 's/[";]//g' |awk '{print $3}'`
echo "DB_NAME: $DB_NAME"
echo "DB_USER: $DB_USER"
#echo "DB_PASS: $DB_PASS"
echo "DB_HOST: $DB_HOST"
echo
......@@ -26,3 +37,4 @@ echo
echo -n klientu: ; netstat -nlpa | grep :443 | grep ESTA | wc -l;
echo -n FIN:; netstat | grep WAIT2 | wc -l
exit 0
AUTHORS AND MAINTAINERS :
MAIN DEVELOPERS:
Tomas Plesnik <plesnik@ics.muni.cz>
Jan Soukal <soukal@ics.muni.cz>
Michal Kostenec <kostenec@civ.zcu.cz>
Tomas Plesnik <plesnik@ics.muni.cz>
Jan Soukal <soukal@ics.muni.cz>
Michal Kostenec <kostenec@civ.zcu.cz>
CONTRIBUTORS:
Vit Slama <slama@cis.vutbr.cz>
......
2012-07-20 v2.0.0-beta beta version of warden-server-2.0.0
----------------------------------------------------------
2012-07-27 v2.0 stable version
------------------------------
- MySQL database engine used
- Apache used to support faster multithread processing (communication switched to HTTPs protocol)
- enhanced authentization and authorization
......
+------------------------------+
| README - Warden Server 2.0.0 |
+------------------------------+
+----------------------------+
| README - Warden Server 2.0 |
+----------------------------+
Content
......@@ -23,7 +23,7 @@ A. Overall Information
2. Version
2.0.0 (2012-07-20)
2.0 (2012-07-27)
3. Package structure
......@@ -87,11 +87,11 @@ C. Installation
1. Check SHA1 checksum of the Warden server package archive.
$ sha1sum -c warden-server-2.0.0.tar.gz.sig
$ sha1sum -c warden-server-2.0.tar.gz.sig
2. Untar it.
$ tar xzvf warden-server-2.0.0.tar.gz
$ tar xzvf warden-server-2.0.tar.gz
3. Run install.sh.
......@@ -105,7 +105,8 @@ C. Installation
You are advised to check configuration file warden-apache.conf,
warden-server.conf and warden-client.conf in warden-server/etc/
directory after installation.
directory after installation. For more information about post-installation
steps see INSTALL file.
Although this is the Warden server package it also contains several
functions (for administration and maintenance) that are strictly
......
warden-server-2.0.0-beta
warden-server-2.0
......@@ -27,7 +27,7 @@ our $VERSION = "2.0";
# READING OF CONFIGURATION VARIABLES
################################################################################
my $conf_file = "/opt/warden-server/etc/warden-server.conf";
my $conf_file = "/opt/warden-server/etc/warden-server.conf"; # path is updated by install.sh
our $FACILITY = undef;
our $DB_NAME = undef;
our $DB_USER = undef;
......
......@@ -43,7 +43,7 @@ sub c2s
if (!($client = SOAP::Transport::HTTP::Client->new())) {
errMsg("Sorry, unable to create socket: " . &SOAP::Transport::HTTP::Client::errstr)
}
$client->timeout(60);
$client->timeout(10);
$client->ssl_opts( verify_hostname => 1,
SSL_use_cert => 1,
SSL_verify_mode => 0x02,
......
......@@ -43,7 +43,7 @@ sub c2s
if (!($client = SOAP::Transport::HTTP::Client->new())) {
errMsg("Sorry, unable to create socket: " . &SOAP::Transport::HTTP::Client::errstr)
}
$client->timeout(60);
$client->timeout(10);
$client->ssl_opts(verify_hostname => 1,
SSL_use_cert => 1,
SSL_verify_mode => 0x02,
......
......@@ -202,9 +202,24 @@ make_server_conf()
#-------------------------------------------------------------------------------
\$FACILITY = \"local7\";
#-------------------------------------------------------------------------------
# DB_NAME - database name of Warden server
#-------------------------------------------------------------------------------
\$DB_NAME = \"warden\";
#-------------------------------------------------------------------------------
# DB_USER - user of Warden server database
#-------------------------------------------------------------------------------
\$DB_USER = \"username\";
#-------------------------------------------------------------------------------
# DB_PASS - password of Warden server database
#-------------------------------------------------------------------------------
\$DB_PASS = \"\";
#-------------------------------------------------------------------------------
# DB_HOST - what IP address to listen on of Warden server
#-------------------------------------------------------------------------------
\$DB_HOST = \"localhost\";
" > $server_conf 2> $err; ret_val=`echo $?`
......@@ -336,6 +351,7 @@ create_symlinks
echo
echo "Please check client configuration file in ${client_conf}!"
echo "Please check server configuration file in ${server_conf}!"
echo "Please check Apache configuration file in ${apache_conf}!"
echo
echo "Warden server directory: $server_path"
echo
......
......@@ -3,35 +3,9 @@
# uninstall.sh
#
# Copyright (C) 2011-2012 Cesnet z.s.p.o
# Author(s): Tomas PLESNIK <plesnik@ics.muni.cz>
# Jan SOUKAL <soukal@ics.muni.cz>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name of the Cesnet z.s.p.o nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# This software is provided ``as is'', and any express or implied
# warranties, including, but not limited to, the implied warranties of
# merchantability and fitness for a particular purpose are disclaimed.
# In no event shall the Cesnet z.s.p.o or contributors be liable for
# any direct, indirect, incidental, special, exemplary, or consequential
# damages (including, but not limited to, procurement of substitute
# goods or services; loss of use, data, or profits; or business
# interruption) however caused and on any theory of liability, whether
# in contract, strict liability, or tort (including negligence or
# otherwise) arising in any way out of the use of this software, even
# if advised of the possibility of such damage.
VERSION="0.2"
VERSION="2.0"
#-------------------------------------------------------------------------------
# FUNCTIONS
......@@ -76,12 +50,10 @@ err_clean()
echo " -> Reverting changes of warden server package ... OK"
rm -rf ${server_path}/* > /dev/null 2>&1 # delete new version
cp -R ${backup_dir}/* $server_path # copy old backuped server
chmod 600 $db_file # change permission to DB file
for file in `ls -1 $bin | grep -v warden-alive | grep -v create_tables.sh | grep -v wardend`
for file in `ls -1 $bin`
do
ln -s ${bin}/$file ${local_bin}/$file # create symlinks to /usr/local/bin
done
ln -s ${bin}/wardend $init # create symlink to /etc/init.d/
$init start # start server
cat $err
rm -rf $err $backup_dir
......@@ -91,26 +63,6 @@ err_clean()
}
os_chck()
{
OS=`uname`
if [ "$OS" != "Linux" ]; then
echo "Sorry, unsupported operating system detected - \"${OS}\"!"
exit 1
fi
}
shell_chck()
{
SHELL=`echo $SHELL`
if [ "$SHELL" != "/bin/bash" ]; then
echo "Sorry, this script is usable in Bourne Again Shell (bash) only!"
exit 1
fi
}
root_chck()
{
if [ $UID -ne 0 ]; then
......@@ -155,7 +107,7 @@ warden_dir_chck()
stop_warden_server()
{
echo "Stopping warden server ... "
${init} force-stop 1>/dev/null 2>&1
${init} stop 1>/dev/null 2>&1
}
......@@ -174,14 +126,11 @@ backup()
delete_symlinks()
{
echo -n "Deleting symlinks from /usr/local/bin ..."
for file in `ls -1 $bin | grep -v warden-alive | grep -v wardend | grep -v create_tables.sh`
for file in `ls -1 $bin`
do
rm -rf ${local_bin}/$file 2> /dev/null
done
echo "OK"
echo -n "Deleting symlink from ${init} ..."
rm -rf $init 2> /dev/null
echo "OK"
}
......@@ -230,11 +179,10 @@ bin="${server_path}/bin"
local_bin="/usr/local/bin"
etc="${server_path}/etc"
var="${server_path}/etc"
db_file="${var}/warden.db"
old_package_version_file="${etc}/package_version"
err="/tmp/warden-err"
backup_dir="/tmp/warden-backup"
init="/etc/init.d/wardend"
init="/etc/init.d/apache2"
# obtain version of installed warden-server package
obtain_package_version
......
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