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

zmena souboru pro megre branche warden-server-2.2 do masteru

parents cc7cd2c7 b19e5b24
No related branches found
No related tags found
No related merge requests found
...@@ -45,7 +45,7 @@ A. Overall Information ...@@ -45,7 +45,7 @@ A. Overall Information
UNINSTALL UNINSTALL
UPDATE UPDATE
warden.mysql warden.mysql
warden20to21.patch warden21to22.patch
etc/ etc/
package_version package_version
warden-apache.conf warden-apache.conf
...@@ -226,7 +226,7 @@ C. Installation ...@@ -226,7 +226,7 @@ C. Installation
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
D. Update D. Update
For update of the Warden server package from local machine use update.sh. For update of the Warden server package from local machine use update.sh.
Default destination directory is /opt/warden-server/. Default destination directory is /opt/warden-server/.
......
...@@ -32,9 +32,14 @@ B. Update steps ...@@ -32,9 +32,14 @@ B. Update steps
C. Post-update steps C. Post-update steps
-------------------- --------------------
1) Update Warden server database 1) Upgrade Warden server database
$ mysql -u <user> -h localhost -p <password> < {warden-server_path}/doc/warden21to22.patch
ATTENTION: Running of the database update script may take a long time (in minutes - depending on the size of the database).
During this process the database will be not available!
$ mysql -u <user> -h localhost -p <password> < {warden-server_path}/doc/warden20to21.patch
2) Restart Apache server 2) Restart Apache server
......
...@@ -41,6 +41,10 @@ CREATE TABLE `clients` ( ...@@ -41,6 +41,10 @@ CREATE TABLE `clients` (
`receive_own_events` varchar(1) default NULL, `receive_own_events` varchar(1) default NULL,
`description_tags` varchar(256) default NULL, `description_tags` varchar(256) default NULL,
`ip_net_client` varchar(256) default NULL, `ip_net_client` varchar(256) default NULL,
<<<<<<< HEAD
=======
`valid` varchar(1) default 't',
>>>>>>> warden-server-2.2
PRIMARY KEY (`client_id`) PRIMARY KEY (`client_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1; ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client; SET character_set_client = @saved_cs_client;
...@@ -67,8 +71,17 @@ CREATE TABLE `events` ( ...@@ -67,8 +71,17 @@ CREATE TABLE `events` (
`note` text, `note` text,
`priority` int(1) unsigned default NULL, `priority` int(1) unsigned default NULL,
`timeout` int(2) unsigned default NULL, `timeout` int(2) unsigned default NULL,
<<<<<<< HEAD
`valid` varchar(1) default NULL, `valid` varchar(1) default NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
=======
`valid` varchar(1) default 't',
`client_id` int(11) default NULL,
PRIMARY KEY (`id`),
KEY `idx_events_type_valid` (`type`,`valid`),
KEY `idx_events_client_id` (`client_id`),
KEY `idx_events_detected` (`detected`)
>>>>>>> warden-server-2.2
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1; ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;
SET character_set_client = @saved_cs_client; SET character_set_client = @saved_cs_client;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
......
ALTER TABLE `clients`
ADD `valid` varchar(1) DEFAULT 't';
ALTER TABLE `events`
ADD `client_id` int(11) DEFAULT NULL;
UPDATE `events`, `clients`
SET events.client_id = clients.client_id
WHERE `events.hostname` = `clients.hostname` AND `events.service` = `clients.service`;
ALTER TABLE `events`
DROP COLUMN `hostname`,
DROP COLUMN `service`;
ALTER TABLE `events`
ADD INDEX `idx_events_type_valid` (`type`,`valid`),
ADD INDEX `idx_events_client_id` (`client_id`),
ADD INDEX `idx_events_detected` (`detected`);
...@@ -21,6 +21,23 @@ use MIME::Base64; ...@@ -21,6 +21,23 @@ use MIME::Base64;
use Crypt::X509; use Crypt::X509;
use SOAP::Lite; use SOAP::Lite;
use Carp; use Carp;
<<<<<<< HEAD
=======
use File::Basename;
my $lib = File::Basename::dirname(__FILE__);
use lib $lib;
use WardenCommon;
################################################################################
# VARIABLES
################################################################################
our $VERSION = "2.2";
our $FILENAME = File::Basename::basename(__FILE__);
my $etc = "$lib/../etc";
>>>>>>> warden-server-2.2
our $VERSION = "2.1"; our $VERSION = "2.1";
......
...@@ -283,6 +283,7 @@ PerlSwitches -I $lib ...@@ -283,6 +283,7 @@ PerlSwitches -I $lib
} }
<<<<<<< HEAD
changeServerPath() changeServerPath()
{ {
echo "Update server path ..."; echo "Update server path ...";
...@@ -299,6 +300,9 @@ changeServerPath() ...@@ -299,6 +300,9 @@ changeServerPath()
create_symlinks() create_symlinks()
=======
createSymlinks()
>>>>>>> warden-server-2.2
{ {
echo "Creating symbolic links ..." echo "Creating symbolic links ..."
for file in `ls -1 $bin` for file in `ls -1 $bin`
...@@ -314,7 +318,7 @@ create_symlinks() ...@@ -314,7 +318,7 @@ create_symlinks()
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# list of used Perl modules # list of used Perl modules
modules=(SOAP::Lite SOAP::Transport::HTTP DBI DBD::mysql Format::Human::Bytes Sys::Syslog File::Basename Net::CIDR::Lite DateTime Getopt::Std Switch IO::Socket::SSL MIME::Base64 Crypt::X509 Carp) modules=(SOAP::Lite SOAP::Transport::HTTP DBI DBD::mysql Format::Human::Bytes Sys::Syslog File::Basename Net::CIDR::Lite DateTime Getopt::Std Switch IO::Socket::SSL MIME::Base64 Crypt::X509 Carp FindBin)
# read input # read input
while getopts "d:k:c:a:Vh" options; do while getopts "d:k:c:a:Vh" options; do
...@@ -382,9 +386,12 @@ make_server_conf ...@@ -382,9 +386,12 @@ make_server_conf
# create Apache configuration file # create Apache configuration file
make_apache_conf make_apache_conf
<<<<<<< HEAD
#update paths in utilities #update paths in utilities
changeServerPath changeServerPath
=======
>>>>>>> warden-server-2.2
# crate symlinks from warden server bin directory to /usr/local/bin # crate symlinks from warden server bin directory to /usr/local/bin
create_symlinks create_symlinks
......
...@@ -354,7 +354,7 @@ $valid_strings" > $server_conf_file 2> $err; ret_val=`echo $?` ...@@ -354,7 +354,7 @@ $valid_strings" > $server_conf_file 2> $err; ret_val=`echo $?`
#------------------------------------------------------------------------------- #-------------------------------------------------------------------------------
# list of used Perl modules # list of used Perl modules
modules=(SOAP::Lite SOAP::Transport::HTTP DBI DBD::mysql Format::Human::Bytes Sys::Syslog File::Basename Net::CIDR::Lite DateTime Getopt::Std Switch IO::Socket::SSL MIME::Base64 Crypt::X509 Carp) modules=(SOAP::Lite SOAP::Transport::HTTP DBI DBD::mysql Format::Human::Bytes Sys::Syslog File::Basename Net::CIDR::Lite DateTime Getopt::Std Switch IO::Socket::SSL MIME::Base64 Crypt::X509 Carp FindBin)
# read input # read input
while getopts "d:Vh" options; do 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