Again with the message “Sorry, this file type is not permitted for security reasons” when I attempt to upload my proc. I will have to figure this out
Here is the code for listSites proc
#!/usr/bin/env tcl
# This script will provide a list of sites for this root
proc main {} {
# The get the root path
set root $::env(HCIROOT)
# Read server.ini file
if {[catch {read_file -nonewline [file join $root server server.ini]} ini]} {
puts stderr “\nCannot open server.ini: $ini\n”
exit -1
}
# Get env
if {![regexp -line — {^environs=(.*?)$} $ini {} envStr]} {
puts stderr “\nCannot find site list in server.ini\n”
exit -1
}
set MASTER {}; set DEFAULT {}
catch {
set info [read_file -nonewline [file join $root rootInfo]]
regexp -line — {^site=(.*?)$} $info {} DEFAULT
regexp -line — {^mastersite=(.*?)$} $info {} MASTER
}
puts stdout “\nSite list for root $root:”
foreach site [split $envStr “;”] { lappend siteList [file tail $site] }
foreach site [lsort $siteList] {
set M {}; set D “”
if {$site eq $MASTER} { set M “MASTER SITE” }
if {$site eq $DEFAULT} { set D “DEFAULT SITE” }
puts stdout “\t$site\t\t$M $D”
}
}
main