diff options
author | Brian Somers <brian@FreeBSD.org> | 2000-08-31 20:30:55 +0000 |
---|---|---|
committer | Brian Somers <brian@FreeBSD.org> | 2000-08-31 20:30:55 +0000 |
commit | e697ee667e5e02fc1ab5a45eebce16356b407cf6 (patch) | |
tree | 71afa753659629694da067386dc336f4f8e7c239 /www/httptunnel/files | |
parent | Add ruby-snmp, Ruby interface to UCD-SNMP library. (diff) |
Upgrade to 3.2 (no functional changes)
Set $HTS and $HTC in etc/rc.d/httptunnel.sh
Allow HTCPROXYAUTH to specify a file name
Diffstat (limited to 'www/httptunnel/files')
-rw-r--r-- | www/httptunnel/files/httptunnel.sh | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/www/httptunnel/files/httptunnel.sh b/www/httptunnel/files/httptunnel.sh index c919064ea036..e4d58e2d4dc7 100644 --- a/www/httptunnel/files/httptunnel.sh +++ b/www/httptunnel/files/httptunnel.sh @@ -2,10 +2,12 @@ # # $FreeBSD$ +HTS=%%PREFIX%%/bin/hts # The installed hts program HTSPORT= # [host:]port to listen for htc connection HTSFORWARD= # Talk to this socket HTSDEVICE= # *or* talk to this device +HTC=%%PREFIX%%/bin/htc # The installed htc program HTCPORT= # host:port where hts is running HTCFORWARD= # Talk to this socket HTCDEVICE= # *or* talk to this device @@ -21,7 +23,7 @@ start) if [ -n "$HTSPORT" -a -x $HTS ]; then [ -n "$HTSFORWARD" ] && args="-F $HTSFORWARD" [ -n "$HTSDEVICE" ] && args="-d $HTSDEVICE" - /usr/local/bin/hts $args $HTSPORT && echo -n ' hts' + $HTS $args $HTSPORT && echo -n ' hts' fi if [ -n "$HTCPORT" -a -x $HTC ]; then @@ -30,11 +32,21 @@ start) [ -n "$HTCDEVICE" ] && set -- -d $HTCDEVICE [ -n "$HTCBROWSER" ] && set -- -U "$HTCBROWSER" "$@" if [ -n "$HTCPROXY" ]; then - [ -n "$HTCPROXYBUFFER" ] && set -- -B $HTCPROXYBUFFER "$@" - [ -n "$HTCPROXYAUTH" ] && set -- -A $HTCPROXYAUTH "$@" + [ -n "$HTCPROXYBUFFER" ] && + set -- -B $HTCPROXYBUFFER "$@" + if [ -n "$HTCPROXYAUTH" ] + then + if [ -f "$HTCPROXYAUTH" ] + then + set -- --proxy-authorization-file \ + $HTCPROXYAUTH "$@" + else + set -- -A $HTCPROXYAUTH "$@" + fi + fi set -- -P $HTCPROXY "$@" fi - /usr/local/bin/htc "$@" $HTCARGS $HTCPORT && echo -n ' htc' + $HTC "$@" $HTCARGS $HTCPORT && echo -n ' htc' fi ;; stop) |