ispman/bin ispman.addProcess,NONE,1.1
Joerg Delker <[email protected]>
| Newsgroups | gmane.comp.isp.ispman.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/ispman/ispman/bin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8044/bin
Added Files:
ispman.addProcess
Log Message:
Allows you to add ispman processes from external script/apps.
You have to know the process syntax though, to pass the proper arguments.
--- NEW FILE: ispman.addProcess ---
#!/usr/bin/perl
BEGIN{
use Getopt::Std;
getopt('dpghx', \%opts);
unless ($opts{'d'} && $opts{'p'} && ($opts{'g'} || $opts{'h'})){
print "Usage: ispman.addProcess -d domain -p process (-g hostgroup |-h hostname) [-x params]\n";
print "Example: ispman.addProcess -d example.com -p ModifyVirtualHost -g httpgroup -x ispmanVhostName=www\n";
exit;
}
}
use lib qw(/opt/ispman/lib);
use ISPMan;
my $ispman=ISPMan->new();
my $domain=$opts{'d'};
my $process=$opts{'p'};
my $params=$opts{'x'};
if ($opts{'g'}) {
$ispman->addProcessToGroup($domain,$opts{'g'},$process,$params);
}
if ($opts{'h'}) {
$ispman->addProcessToHost($domain,$opts{'h'},$process,$params);
}
__END__
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl