ispman/bin ispman.substConf,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-serv2860/bin
Added Files:
ispman.substConf
Log Message:
added new script
substitute input data with ISPMan core config values (needed for post installation)
--- NEW FILE: ispman.substConf ---
#!/usr/bin/perl
use FindBin;
use lib ( $FindBin::Bin, "$FindBin::Bin/../lib", "$FindBin::Bin/../conf" );
sub randcrypt {
my $string = shift;
#print "Getting $string\n\n";
return
crypt( $string, join '',
( '.', '/', 0 .. 9, 'A' .. 'Z', 'a' .. 'z' )[ rand 64, rand 64 ] );
}
# read ispman.conf
require "ispman.conf" || die "Cant require ispman.conf";
# read STDIN and substitute any %%token%% or @@eval@@
for (<>) {
s/%%(\w+)?%%/$ISPMan::Config->{$1}/g;
s/\@\@(randcrypt.*?)\@\@/eval($1)/ge;
print;
}
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com