1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
|
#! /bin/sh /usr/share/dpatch/dpatch-run
## 30-invoke-rc.dpatch by <math.parent@gmail.com>
##
## DP: Debian specific invocation of services
@DPATCH@
Index: b/lib/Kolab/Conf.pm
===================================================================
--- a/lib/Kolab/Conf.pm
+++ b/lib/Kolab/Conf.pm
@@ -855,38 +855,28 @@
{
if ($haschanged{'slapd'}) {
&Kolab::log('K', 'Restarting OpenLDAP...');
- system("$Kolab::config{'KOLABRC'} rc openldap restart &");
+ system("invoke-rc.d slapd restart &");
}
if ($haschanged{'saslauthd'}) {
&Kolab::log('K', 'Restarting SASLAuthd...');
- system("$Kolab::config{'KOLABRC'} rc sasl stop; sleep 1; $Kolab::config{sbindir}/saslauthd -a ldap -n 5");
+ system("invoke-rc.d saslauthd restart");
}
if ($haschanged{'apache'}) {
&Kolab::log('K', 'Reloading Apache...');
- system("$Kolab::config{sbindir}/apachectl graceful");
+ system("invoke-rc.d apache2 graceful");
}
if ($haschanged{'postfix'}) {
&Kolab::log('K', 'Reloading Postfix...');
- system("$Kolab::config{sbindir}/postfix reload");
+ system("invoke-rc.d postfix reload");
}
if ($haschanged{'imapd'}) {
&Kolab::log('K', 'Restarting imapd...');
# Would it be enough with a reload here? /steffen
- system("$Kolab::config{'KOLABRC'} rc imapd restart");
- }
-
- if ($haschanged{'amavisd'}) {
- &Kolab::log('K', 'Restarting amavisd...');
- system("$Kolab::config{'KOLABRC'} rc amavisd restart");
- }
-
- if ($haschanged{'clamav'}) {
- &Kolab::log('K', 'Restarting clamav...');
- system("$Kolab::config{'KOLABRC'} rc clamav restart");
+ system("invoke-rc.d kolab-cyrus restart");
}
%Kolab::Conf::haschanged = ();
Index: b/sbin/kolab_bootstrap.in
===================================================================
--- a/sbin/kolab_bootstrap.in
+++ b/sbin/kolab_bootstrap.in
@@ -112,7 +112,7 @@
print ("Error: Found $name running on Port $port\n");
print ("Check your installation!\n");
print ("You must stop the service $name before running Kolab\n");
- print ("You may try to execute \"$Kolab::config{'KOLABRC'} rc all stop\" initially\n");
+ print ("You may try to execute \"/etc/init.d/\$DAEMON stop\" initially\n");
exit 1;
}
}
@@ -645,7 +645,7 @@
if ($ldap_uri =~ /127\.0\.0\.1/ || $ldap_uri =~ /localhost/) {
print "\nkill temporary slapd\n\n";
- system("$Kolab::config{'KOLABRC'} rc $Kolab::config{'LDAPD'} stop");
+ system("invoke-rc.d slapd stop");
sleep 1; # actually race should be impossible
system("killall -9 slapd >/dev/null 2>&1");
}
@@ -698,7 +698,7 @@
##### Slave server setup
print "stop running slapd (if any)\n";
- kolab_system("$Kolab::config{'KOLABRC'} rc $Kolab::config{'LDAPD'} stop");
+ kolab_system("invoke-rc.d slapd stop");
# Make sure that no rogue demons are running
tryConnect( '127.0.0.1', 389 ) && die "A process is already listening to port 389 (ldap)\n"
@@ -822,9 +822,9 @@
is copied over to this slave. Please make sure that this slave is entered into the list
of kolabhosts on the master before proceeding.
EOS
- kolab_system("ssh -C $master_host \'$Kolab::config{'KOLABRC'} rc $Kolab::config{'LDAPD'} stop".
+ kolab_system("ssh -C $master_host \'invoke-rc.d slapd stop".
" && $Kolab::config{'TAR'} -C $Kolab::config{'ldapserver_statedir'} -pcf - openldap-data".
- " && $Kolab::config{'KOLABRC'} rc $Kolab::config{'LDAPD'} start\'".
+ " && invoke-rc.d slapd start\'".
" | $Kolab::config{'TAR'} -C $Kolab::config{'ldapserver_statedir'} -pxf -");
}
@@ -916,6 +916,6 @@
#system("@CONFIG_DIR@/kolab_sslcert.sh $fqdn");
print "kolab is now ready to run!\n";
-print "please run '$Kolab::config{'KOLABRC'} rc all start'\n";
+print "please restart all the daemons\n";
print ("Use login=manager and passwd=" . Encode::decode_utf8($bind_pw) . " when you log into\n");
print ("the webinterface https://$fqdn$Kolab::config{'kolab_wui'} !\n");
|