aboutsummaryrefslogtreecommitdiff
path: root/www/httptunnel
diff options
context:
space:
mode:
authorFlorent Thoumie <flz@FreeBSD.org>2005-04-04 12:54:40 +0000
committerFlorent Thoumie <flz@FreeBSD.org>2005-04-04 12:54:40 +0000
commitf9a6f7678511b5074f370d6a8760befff1caed67 (patch)
treeaeef9bbb82c69cd97c283bd1b93b8206fa3c94d1 /www/httptunnel
parentc6527a496cdf8e5d2dd8f7067bb44ca57aa07aed (diff)
downloadports-f9a6f7678511b5074f370d6a8760befff1caed67.tar.gz
ports-f9a6f7678511b5074f370d6a8760befff1caed67.zip
Notes
Diffstat (limited to 'www/httptunnel')
-rw-r--r--www/httptunnel/files/httptunnel.sh22
1 files changed, 11 insertions, 11 deletions
diff --git a/www/httptunnel/files/httptunnel.sh b/www/httptunnel/files/httptunnel.sh
index e4d58e2d4dc7..6cc2093ea69e 100644
--- a/www/httptunnel/files/httptunnel.sh
+++ b/www/httptunnel/files/httptunnel.sh
@@ -2,6 +2,8 @@
#
# $FreeBSD$
+USER=httptunnel
+
HTS=%%PREFIX%%/bin/hts # The installed hts program
HTSPORT= # [host:]port to listen for htc connection
HTSFORWARD= # Talk to this socket
@@ -23,30 +25,28 @@ start)
if [ -n "$HTSPORT" -a -x $HTS ]; then
[ -n "$HTSFORWARD" ] && args="-F $HTSFORWARD"
[ -n "$HTSDEVICE" ] && args="-d $HTSDEVICE"
- $HTS $args $HTSPORT && echo -n ' hts'
+ su -m $USER -c "$HTS $args $HTSPORT" && echo -n ' hts'
fi
if [ -n "$HTCPORT" -a -x $HTC ]; then
- set --
- [ -n "$HTCFORWARD" ] && set -- -F $HTCFORWARD
- [ -n "$HTCDEVICE" ] && set -- -d $HTCDEVICE
- [ -n "$HTCBROWSER" ] && set -- -U "$HTCBROWSER" "$@"
+ [ -n "$HTCFORWARD" ] && args="-F $HTCFORWARD"
+ [ -n "$HTCDEVICE" ] && args="-d $HTCDEVICE"
+ [ -n "$HTCBROWSER" ] && args="-U \"$HTCBROWSER\" $args"
if [ -n "$HTCPROXY" ]; then
[ -n "$HTCPROXYBUFFER" ] &&
- set -- -B $HTCPROXYBUFFER "$@"
+ args="-B $HTCPROXYBUFFER $args"
if [ -n "$HTCPROXYAUTH" ]
then
if [ -f "$HTCPROXYAUTH" ]
then
- set -- --proxy-authorization-file \
- $HTCPROXYAUTH "$@"
+ args="--proxy-authorization-file $HTCPROXYAUTH $args"
else
- set -- -A $HTCPROXYAUTH "$@"
+ args="-A $HTCPROXYAUTH $args"
fi
fi
- set -- -P $HTCPROXY "$@"
+ args="-P $HTCPROXY $args"
fi
- $HTC "$@" $HTCARGS $HTCPORT && echo -n ' htc'
+ su -m $USER -c "$HTC $args $HTCARGS $HTCPORT" && echo -n ' htc'
fi
;;
stop)