diff options
author | flz <flz@FreeBSD.org> | 2005-04-04 20:54:40 +0800 |
---|---|---|
committer | flz <flz@FreeBSD.org> | 2005-04-04 20:54:40 +0800 |
commit | 5eeaa5048bfdc5e4a67c3e24a5a7cd8816c4999c (patch) | |
tree | d201b9d75f7ab84903fcbbd78bb52843b8f8670d /www/httptunnel | |
parent | 0c6cb533744d39058bf5c75aa7aead8b787b0a48 (diff) | |
download | freebsd-ports-gnome-5eeaa5048bfdc5e4a67c3e24a5a7cd8816c4999c.tar.gz freebsd-ports-gnome-5eeaa5048bfdc5e4a67c3e24a5a7cd8816c4999c.tar.zst freebsd-ports-gnome-5eeaa5048bfdc5e4a67c3e24a5a7cd8816c4999c.zip |
- Fix startup script to use a non-root user account to run.
PR: ports/28887
Submitted by: The Anarcat <anarcat@tao.ca>
Diffstat (limited to 'www/httptunnel')
-rw-r--r-- | www/httptunnel/files/httptunnel.sh | 22 |
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) |