Check-in [3ed8ae2b4b]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Updated to read configuration file correctly Updated to normalize paths relative to starkit/starpack
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:3ed8ae2b4b0b264bbdf03f4335c0ade587e3d923
User & Date: rkeene 2011-07-01 11:53:03
Context
2011-07-08
13:12
Updated to include source for compiled Rivet parser (untested) check-in: ac5f782e14 user: rkeene tags: trunk
2011-07-01
11:53
Updated to read configuration file correctly Updated to normalize paths relative to starkit/starpack check-in: 3ed8ae2b4b user: rkeene tags: trunk
11:15
Fixed configuration file to work with starkits as well as starpacks check-in: 81539be14a user: rkeene tags: trunk
Changes

Changes to rivet-starkit/main.tcl.

834
835
836
837
838
839
840

841
842
843
844
845
846
847
...
849
850
851
852
853
854
855

856
857
858
859
860
861
862
...
883
884
885
886
887
888
889
890
891
892



893
894
895
896
897
898
899
....
1417
1418
1419
1420
1421
1422
1423
1424

1425
1426
1427
1428
1429
1430
1431


1432
1433
1434
1435
1436
1437
1438
		"-" {
			set logfd stdout
		}
		"" {
			set logfd ""
		}
		default {

			set logfd [open $logfile a]
		}
	}

	switch -- $errorlogfile {
		"-" {
			set elogfd stderr
................................................................................
		"" {
			set elogfd stderr
			catch {
				set elogfd [open /dev/null a]
			}
		}
		default {

			set elogfd [open $errorlogfile a]
		}
	}

	catch {
		wm withdraw .
	}
................................................................................
			package require tls

			set cmd [list tls::socket -server $servercmd -tls1 true -command [list rivet_cgi_tls_callback $logfd $elogfd]]
			foreach opt [array names sslopts] {
				set val $sslopts($opt)

				switch -- $opt {
					"require" {
						set val [expr $val]
					}



					default {
						if {$val == ""} {
							continue
						}
					}
				}

................................................................................
	set cmd [lindex $argv 0]
	set argv [lrange $argv 1 end]

	switch -- $cmd {
		"--server" {
			set conffile [file dirname [info script]]
			append conffile ".conf"
			if {[info exists $conffile]} {

				catch {
					set fd [open $conffile]

					set argv [read -nonewline $fd]

					close $fd
				}


			}

			set options(--address) "ALL"
			set options(--port) 80
			set options(--foreground) no
			set options(--init) ""
			set options(--logfile) ""







>







 







>







 







|


>
>
>







 







|
>



|



>
>







834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
...
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
...
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
....
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
		"-" {
			set logfd stdout
		}
		"" {
			set logfd ""
		}
		default {
			set logfile [file join [file dirname [file dirname [info script]]] $logfile]
			set logfd [open $logfile a]
		}
	}

	switch -- $errorlogfile {
		"-" {
			set elogfd stderr
................................................................................
		"" {
			set elogfd stderr
			catch {
				set elogfd [open /dev/null a]
			}
		}
		default {
			set errorlogfile [file join [file dirname [file dirname [info script]]] $errorlogfile]
			set elogfd [open $errorlogfile a]
		}
	}

	catch {
		wm withdraw .
	}
................................................................................
			package require tls

			set cmd [list tls::socket -server $servercmd -tls1 true -command [list rivet_cgi_tls_callback $logfd $elogfd]]
			foreach opt [array names sslopts] {
				set val $sslopts($opt)

				switch -- $opt {
					"require" - "request" {
						set val [expr $val]
					}
					"certfile" - "keyfile" - "cafile" - "cadir" {
						set val [file normalize [file join [file dirname [file dirname [info script]]] $val]]
					}
					default {
						if {$val == ""} {
							continue
						}
					}
				}

................................................................................
	set cmd [lindex $argv 0]
	set argv [lrange $argv 1 end]

	switch -- $cmd {
		"--server" {
			set conffile [file dirname [info script]]
			append conffile ".conf"
			if {[file exists $conffile]} {
				set argv_conf [list]
				catch {
					set fd [open $conffile]

					set argv_conf [read -nonewline $fd]

					close $fd
				}

				set argv [concat $argv_conf $argv]
			}

			set options(--address) "ALL"
			set options(--port) 80
			set options(--foreground) no
			set options(--init) ""
			set options(--logfile) ""