[ ispman-WishList-1567721 ] postcreation scripts
"SourceForge.net" <[email protected]> Mon, 12 Feb 2007 21:20:20 -0800
| Newsgroups | gmane.comp.isp.ispman.devel |
|---|---|
| Message-ID | <[email protected]> |
WishList item #1567721, was opened at 2006-09-29 13:40
Message generated for change (Comment added) made by case2020
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=447192&aid=1567721&group_id=8390
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 4
Private: No
Submitted By: Andreas John (derjohn)
Assigned to: Nobody/Anonymous (nobody)
Summary: postcreation scripts
Initial Comment:
Hello,
I would like to see postcreation script after adding
domains and/or after adding vhosts. The script should
be choosable before the vhost is created.
The idea behind that is one may add a vhost and choose
"postcreation script typo3" or "postcreation script
whatever" which prepares suff in the vhosts dir and
maybe autocreates mysql accounts etc.
The admin should be able to choose the script each time
you create a vhost.
----------------------------------------------------------------------
Comment By: case (case2020)
Date: 2007-02-13 05:20
Message:
Logged In: YES
user_id=1375888
Originator: NO
sorry, this code has to be placed in edit.tmpl starting at line 169:
<tr>
<td valign=top>Custom webapplication<br>(Optional)</td>
<td colspan=2>
<select name="ispmanVhostApplication" >
<perl>
my $apptext="";
my @appoptions=split
",",$ispman->getConf("apacheVhostsApplications");
my $app_options=$ispman->{'vhost'}->{"ispmanVhostApplication"};
for (@appoptions){
$_ =~ s/^\*//;
$apptext.="<option VALUE=\"$_\" ";
$apptext.="selected" if ( $_ eq $app_options ) ;
$apptext.=">$_</option>\n";
}
$apptext
</perl>
</select>
</td>
</tr>
and you have to add this to your scheme: (starting at line 688)
attributeType ( 1.3.6.1.4.1.8833.2.1.1421 NAME 'ispmanVhostApplication'
DESC 'Custom webapplication installed, e.g. typo3'
EQUALITY caseExactIA5Match
SUBSTR caseExactIA5SubstringsMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
)
and in line 1399 (after adding above):
ispmanVhostApplication $
of course the template has to be added (template/vhost.ldif.template, line
54):
# setting ispmanVhostApplication
if ($r->param("ispmanVhostApplication")){
$text.="ispmanVhostApplication: " .
$r->param("ispmanVhostApplication")."\n";
}
otherwise this option will not get used.
It would be nice if some of the main developers could take a look at this
and decide if this could be maybe integrated in the source?
TIA
----------------------------------------------------------------------
Comment By: case (case2020)
Date: 2007-02-13 04:15
Message:
Logged In: YES
user_id=1375888
Originator: NO
The same code should be placed in edit.tmpl starting at line 169.
----------------------------------------------------------------------
Comment By: case (case2020)
Date: 2007-02-13 04:11
Message:
Logged In: YES
user_id=1375888
Originator: NO
PartI: This is for the add vhost menu (insert beginning at line 191 of
add.tmpl)
<tr>
<td valign=top>Custom webapplication<br>(Optional)</td>
<td colspan=2>
<select name="ispmanVhostApplications" >
<perl>
my $apptext="";
my @appoptions=split
",",$ispman->getConf("apacheVhostsApplications");
for (@appoptions){
if ($_ =~ s/^\*//) {
$apptext.="<option VALUE=\"$_\" selected>$_</option>";
} else {
$apptext.="<option VALUE=\"$_\">$_</option>";
}
}
$apptext
</perl>
</select>
</td>
</tr>
The ldif for the applications:
version: 1
# LDIF Export for:
ispmanVar=apacheVhostsApplications,ispmanModule=apache_vars,ou=conf,o=ispman
# Search Scope: base
# Search Filter: (objectClass=*)
# Total Entries: 1
dn:
ispmanVar=apacheVhostsApplications,ispmanModule=apache_vars,ou=conf,o=ispman
ispmanModule: apache_vars
ispmanVar: apacheVhostsApplications
objectClass: ispmanConfVar
ispmanVal: typo3,mantis,vtiger,dotproject
ispmanQuestion: Please enter your custom applications separated by comma
ispmanVarAlias: available webaplications
----------------------------------------------------------------------
Comment By: case (case2020)
Date: 2007-02-13 00:29
Message:
Logged In: YES
user_id=1375888
Originator: NO
As I feel that we need this feature very badly I recommend the following
solution as a first step:
1. Someone should patch the tasks script for add/edit/delete vhosts in
that way, that after that task a custom file is called if present ( e.g.
[-f /usr/local/sbin/ispman.addVhost.local ] then exec ..).
This custom file/script should be provided with the full data of the
process (process id, creator, etc., including the creators e-mail, so that
a feedback can be given by the script itself if needed).
2. To decide what to do I suggest to use the "Extra configurations" in
vhosts config, e.g. this way: #ispmanApplication typo3
3. the .local script should be able to parse this and invoke scripts that
might be useful
as an example we will provide some scripts e.g for typo3, mantis vtiger
...
So, can someone please add those hooks?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=447192&aid=1567721&group_id=8390
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642