steffen: server/perl-kolab/Kolab Makefile.am, NONE, 1.1 Kolab.pm, 1.21, 1.22

cvs at intevation.de cvs at intevation.de
Wed Jun 8 14:44:37 CEST 2005


Author: steffen

Update of /kolabrepository/server/perl-kolab/Kolab
In directory doto:/tmp/cvs-serv22190/Kolab

Modified Files:
	Kolab.pm 
Added Files:
	Makefile.am 
Log Message:
autoperlized perl-kolab. Last non-autoperl version is tagged pre_autoperl

--- NEW FILE: Makefile.am ---
include_HEADERS = Kolab.pm

Index: Kolab.pm
===================================================================
RCS file: /kolabrepository/server/perl-kolab/Kolab/Kolab.pm,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- Kolab.pm	28 May 2005 22:10:20 -0000	1.21
+++ Kolab.pm	8 Jun 2005 12:44:35 -0000	1.22
@@ -3,7 +3,7 @@
 ##
 ##  Copyright (c) 2003  Code Fusion cc
 ##
-##    Writen by Stuart Bing?<s.binge at codefusion.co.za>
+##    Writen by Stuart Bingë <s.binge at codefusion.co.za>
 ##
 ##  This  program is free  software; you can redistribute  it and/or
 ##  modify it  under the terms of the GNU  General Public License as
@@ -30,6 +30,7 @@
 use vars qw(%config %haschanged $reloadOk);
 
 require Exporter;
+require "config.h"
 
 our @ISA = qw(Exporter);
 
@@ -82,12 +83,12 @@
         &log('C', 'Unable to determine the kolab root directory', KOLAB_ERROR);	
 	$error = 1;
     } else {
-        %config = readConfig(%config, "$tempval/etc/kolab/kolab.globals");
+        %config = readConfig(%config, "$tempval$ap::config->{sysconfdir}/kolab/kolab.globals");
         $config{'prefix'} = $tempval;
     }
 
     # Now read `kolab.conf', overwriting values read from `kolab.globals'
-    %config = readConfig(\%config, "$tempval/etc/kolab/kolab.conf");
+    %config = readConfig(\%config, "$tempval$ap::config->{sysconfdir}/kolab/kolab.conf");
 
 #    $config{'log_level'} = KOLAB_WARN if (!exists $config{'log_level'});
     &log('C', 'Reloading configuration');
@@ -126,7 +127,7 @@
 
     # Make a hash of the bind password available too
     if( !exists $config{'bind_pw_hash'} ) {
-      my $hashcmd = $config{'prefix'}."/sbin/slappasswd -s '".$config{'bind_pw'}."'";
+      my $hashcmd = $config{'prefix'}."$ap::config->{sbindir}/slappasswd -s '".$config{'bind_pw'}."'";
       $config{'bind_pw_hash'} = `$hashcmd`;
       chomp($config{'bind_pw_hash'});
     }
@@ -350,49 +351,49 @@
 
     if ($haschanged{'slapd'}) {
         &log('K', 'Restarting OpenLDAP...');
-        system("$prefix/bin/openpkg rc openldap restart &");
+        system("$ap::config->{sbindir}/slurpd restart &");
     }
 
     if ($haschanged{'saslauthd'}) {
         &log('K', 'Restarting SASLAuthd...');
-        system("$prefix/bin/openpkg rc sasl stop; sleep 1; $prefix/sbin/saslauthd -a ldap -n 5");
+        system("$ap::config->{sbindir}/rcsaslauthd stop; sleep 1; $ap::config->{sbindir}/rcsaslauthd -a ldap -n 5");
     }
 
     if ($haschanged{'apache'}) {
         &log('K', 'Reloading Apache...');
-        system("$prefix/sbin/apachectl graceful");
+        system("$ap::config->{sbindir}/apache2ctl graceful");
     }
 
     if ($haschanged{'postfix'}) {
         &log('K', 'Reloading Postfix...');
-        system("$prefix/sbin/postfix reload");
+        system("$ap::config->{sbindir}/rcpostfix reload");
     }
 
     if ($haschanged{'imapd'}) {
         &log('K', 'Restarting imapd...');
-        system("$prefix/bin/openpkg rc imapd restart");
+        system("$ap::config->{sbindir}/rccyrus restart");
     }
 
     if ($haschanged{'amavisd'}) {
         &log('K', 'Restarting amavisd...');
-        system("$prefix/bin/openpkg rc amavisd restart");
+        system("$ap::config->{sbindir}/rcamavisd restart");
     }
 
     if ($haschanged{'clamav'}) {
         &log('K', 'Restarting clamav...');
-        system("$prefix/bin/openpkg rc clamav restart");
+        system("$ap::config->{sbindir}/clamd restart");
     }
 
     if ($config{'proftpd-ftp'} =~ /true/i) {
         Kolab::log('K', 'Starting ProFTPd if not running');
-        system("$prefix/bin/openpkg rc proftpd start");
+        system("$ap::config->{bindir}/openpkg rc proftpd start");
         if ($haschanged{'proftpd'}) {
             &log('K', 'Reloading ProFTPd...');
-            kill('SIGHUP', `cat $prefix/var/proftpd/proftpd.pid`);
+            kill('SIGHUP', `cat $ap::config->{localstatedir}/proftpd/proftpd.pid`);
         }
     } else {
         &log('K', 'Stopping ProFTPd, if running...');
-        system("$prefix/bin/openpkg rc proftpd stop");
+        system("$ap::config->{bindir}/openpkg rc proftpd stop");
     }
 
     %Kolab::Conf::haschanged = ();





More information about the commits mailing list