Index by: file name |
procedure name |
procedure call |
annotation
installVirtualHost_proc.tcl
(annotations | original source)
####################################################################
# proc installVirtualHost.
####################################################################
proc installVirtualHost { virtualhostName hostAliases } {
global AdminConfig
set procName [ lindex [ info level 0 ] 0 ]
putsLog "## proc - $procName"
foreach i [ info args $procName ] {
upvar 0 $i ilocal
set propertiesArray($i) $ilocal
}
putsLog "properties are.................."
foreach { a b } [ array get propertiesArray ] {
putsLog [ format "%-35s %s" "$a" "$b" ]
}
putsLog "new virtualhostName is $virtualhostName"
foreach i $hostAliases {
putsLog "new hostAlias is $i"
}
set vHosts [ $AdminConfig list VirtualHost ]
putsLog "Installed virtual hosts are................"
showList $vHosts
# get attribute name of each vhost and add to a list.
foreach i $vHosts { lappend nameList [ $AdminConfig showAttribute $i name ] }
#puts $nameList
catch {lsearch $nameList $virtualhostName } r
# delete the virtual host if it exists.
if { $r != -1 } {
if { [ catch { deleteVirtualHost $virtualhostName } r ] == 0 } {
putsLog $r
} else {
putsLog $r
return -code error
}
}
# create the virtual host if it exists.
if { [ catch { createVirtualHost $virtualhostName $hostAliases } r ] != 0 } {
return -code error
}
}
Index by: file name |
procedure name |
procedure call |
annotation
File generated 2007-08-07 at 13:42.