| 192 |
- |
1 |
#!/usr/bin/perl
|
|
|
2 |
open(CONF, "</etc/webmin/miniserv.conf") || die "Failed to open /etc/webmin/miniserv.conf : $!";
|
|
|
3 |
while(<CONF>) {
|
|
|
4 |
$root = $1 if (/^root=(.*)/);
|
|
|
5 |
}
|
|
|
6 |
close(CONF);
|
|
|
7 |
$root || die "No root= line found in /etc/webmin/miniserv.conf";
|
|
|
8 |
$ENV{'PERLLIB'} = "$root";
|
|
|
9 |
$ENV{'WEBMIN_CONFIG'} = "/etc/webmin";
|
|
|
10 |
$ENV{'WEBMIN_VAR'} = "/var/webmin";
|
| 203 |
- |
11 |
delete($ENV{'MINISERV_CONFIG'});
|
| 192 |
- |
12 |
chdir("$root/system-status");
|
|
|
13 |
exec("$root/system-status/enable-collection.pl", @ARGV) || die "Failed to run $root/system-status/enable-collection.pl : $!";
|