TT#97400 prosody: [de]activate just the main domain

* conference. subdomain was missing
* mod_sipwise_vhosts_sql module is now taking care of [de]activation
  of the subdomains
* send quit command when leaving the console to avoid error in log

> Oct 19 19:22:43 sp1 (debug) prosody[25167]: socket: connection failed in read event: closed

Change-Id: If1d80652efba0a587f29ecc692282c8db067e450
(cherry picked from commit 258a54de88)
(cherry picked from commit 41970bc8c7)
mr8.5.2
Victor Seva 5 years ago
parent 87a06709c0
commit a0a80ed77e
No known key found for this signature in database
GPG Key ID: B1589889727198E0

@ -22,13 +22,7 @@ sub activate_domain {
} else {
$ok = 0;
}
$t->print("host:activate('search.$domain', { component_module = 'sipwise_vjud' })");
($res, $amatch) = $t->waitfor('/(Result: \w+)|(Message: .+)/');
if($amatch =~ /Result:\s*true/) {
# fine
} else {
$ok = 0;
}
$t->print("quit");
}
return $ok if($ok);
@ -54,13 +48,7 @@ sub deactivate_domain {
} else {
$ok = 0;
}
$t->print("host:deactivate('search.$domain')");
($res, $amatch) = $t->waitfor('/(Result: \w+)|(Message: .+)/');
if($amatch =~ /Result:\s*true/) {
# fine
} else {
$ok = 0;
}
$t->print("quit");
}
return $ok if($ok);

Loading…
Cancel
Save