summaryrefslogtreecommitdiff
path: root/web/bin
diff options
context:
space:
mode:
authorEduardo Chappa <echappa@gmx.com>2013-02-03 00:59:38 -0700
committerEduardo Chappa <echappa@gmx.com>2013-02-03 00:59:38 -0700
commit094ca96844842928810f14844413109fc6cdd890 (patch)
treee60efbb980f38ba9308ccb4fb2b77b87bbc115f3 /web/bin
downloadalpine-094ca96844842928810f14844413109fc6cdd890.tar.xz
Initial Alpine Version
Diffstat (limited to 'web/bin')
-rw-r--r--web/bin/README20
l---------web/bin/alpine.tcl1
-rwxr-xr-xweb/bin/launch.tcl51
l---------web/bin/tclsh1
-rwxr-xr-xweb/bin/usage.tcl24
5 files changed, 97 insertions, 0 deletions
diff --git a/web/bin/README b/web/bin/README
new file mode 100644
index 00000000..a6f5fa90
--- /dev/null
+++ b/web/bin/README
@@ -0,0 +1,20 @@
+# ========================================================================
+# Copyright 2006 University of Washington
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# ========================================================================
+
+
+ this directory holds binaries for use by the web alpine cgi.
+ the alpined is the serverlet that provides mailbox
+ data and session management to the web alpine scripts.
+
+ make sure alpined resides in this directory.
+
+ make sure tclsh points to the tclsh binary for your system.
+
diff --git a/web/bin/alpine.tcl b/web/bin/alpine.tcl
new file mode 120000
index 00000000..976166f1
--- /dev/null
+++ b/web/bin/alpine.tcl
@@ -0,0 +1 @@
+../config/alpine.tcl \ No newline at end of file
diff --git a/web/bin/launch.tcl b/web/bin/launch.tcl
new file mode 100755
index 00000000..8751c33f
--- /dev/null
+++ b/web/bin/launch.tcl
@@ -0,0 +1,51 @@
+#!./tclsh
+# $Id: launch.tcl 1266 2009-07-14 18:39:12Z hubert@u.washington.edu $
+# ========================================================================
+# Copyright 2006 University of Washington
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# ========================================================================
+
+# Generate a session key, create the connection points (fifos),
+# spawn the mail engine and then hand the session key to the
+# caller
+
+# Source config information
+source ./alpine.tcl
+
+# generate session id
+WPValidId
+
+if {[info exists env(REMOTE_USER)]} {
+ set servlet $_wp(pc_servlet)
+ set env(LOGNAME) $env(REMOTE_USER)
+} else {
+ set servlet $_wp(servlet)
+}
+
+set cmd "exec -- echo $_wp(sockname) | [file join $_wp(bin) $servlet]"
+
+# set debug level and configure dmalloc
+#append cmd " -d -d -d -d -d -d -d"
+#set env(DMALLOC_OPTIONS) "check-fence,check-heap,check-blank,log=/tmp/logfile.%d"
+
+if {[catch {eval $cmd} errmsg]} {
+ puts stderr "Unable to Launch servlet: $errmsg"
+ exit 1
+} elseif {[info exists env(REMOTE_ADDR)] && [string length $env(REMOTE_ADDR)]} {
+ catch {WPCmd PEInfo set wp_client $env(REMOTE_ADDR)}
+} elseif {[info exists env(REMOTE_HOST)] && [string length $env(REMOTE_HOST)]} {
+ catch {WPCmd PEInfo set wp_client $env(REMOTE_HOST)}
+}
+
+if {$_wp(debug) > 0} {
+ WPCmd PEDebug level $_wp(debug)
+}
+
+puts $_wp(sessid)
+exit 0
diff --git a/web/bin/tclsh b/web/bin/tclsh
new file mode 120000
index 00000000..89acb765
--- /dev/null
+++ b/web/bin/tclsh
@@ -0,0 +1 @@
+/usr/bin/tclsh \ No newline at end of file
diff --git a/web/bin/usage.tcl b/web/bin/usage.tcl
new file mode 100755
index 00000000..8b597951
--- /dev/null
+++ b/web/bin/usage.tcl
@@ -0,0 +1,24 @@
+#!./tclsh
+# $Id: usage.tcl 1169 2008-08-27 06:42:06Z hubert@u.washington.edu $
+# ========================================================================
+# Copyright 2008 University of Washington
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# ========================================================================
+
+# Return mail store usage numbers on stdout separated by a space
+# First number is amount of usage
+# Second is total amount of space available
+# Integer values. Unit are megabytes (MB).
+
+set cmd "exec -- /usr/local/bin/dmq -u [lindex $argv 0]"
+if {0 == [catch {eval $cmd} result]} {
+ if {[regexp {^[0-9]+[ \t]+([0-9]+)\.[0-9]*[ \t]+([0-9]+)$} $result dummy usage total]} {
+ puts stdout "$usage $total"
+ }
+}