Code

4a4ddf643ab742be8707e5f679eb4802b18e5b50
[gosa.git] / gosa-si / modules / ServerPackages.pm
1 package ServerPackages;
3 use Exporter;
4 @ISA = ("Exporter");
6 # Each module has to have a function 'process_incoming_msg'. This function works as a interface to gosa-sd and receives the msg hash from gosa-sd. 'process_incoming_function checks, wether it has a function to process the incoming msg and forward the msg to it. 
8 use strict;
9 use warnings;
10 use GOSA::GosaSupportDaemon;
12 #use IO::Socket::INET;
13 #use XML::Simple;
14 #use Data::Dumper;
15 #use NetAddr::IP;
16 #use Net::LDAP;
17 #use Socket;
18 #use Net::hostent;
20 my $event_dir = "/usr/lib/gosa-si/server/events";
21 use lib "/usr/lib/gosa-si/server/events";
23 BEGIN{}
24 END {}
27 ### START #####################################################################
29 # import local events
30 my ($error, $result, $event_hash) = &import_events($event_dir);
31 if ($error == 0) {
32     foreach my $log_line (@$result) {
33         &main::daemon_log("0 INFO: ServerPackages - $log_line", 5);
34     }
35 } else {
36     foreach my $log_line (@$result) {
37         &main::daemon_log("0 ERROR: ServerPackages - $log_line", 1);
38     }
39 }
41 ### FUNCTIONS #####################################################################
43 sub get_module_info {
44     my @info = ($main::server_address,
45             );
46     return \@info;
47 }
50 1;