OpenSondage integration on SME Server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
404 B

{
use esmith::DomainsDB;
my $d = esmith::DomainsDB->open_ro || die "Couldn't open DomainsDB";
my $vhost = "$SystemName.$DomainName";
foreach ($d->get_all_by_prop(type => 'domain'), $d->get_all_by_prop(type => 'vhost')){
my $root = $_->prop('DocumentRoot') || '';
if ($root eq '/usr/share/opensondage'){
$vhost = $_->key;
last;
}
}
$OUT .= "define('STUDS_URL', '$vhost');";
}