summaryrefslogtreecommitdiffstats
path: root/net-misc/httptunnel/files/htc
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
commitca9627e70852f6b2e835660df870fe3ab405882d (patch)
tree0a008b1d5b16fa0679a195ed7b5662c7891f591c /net-misc/httptunnel/files/htc
downloaddarklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.gz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.bz2
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.xz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.zip
Initial import
Diffstat (limited to 'net-misc/httptunnel/files/htc')
-rwxr-xr-xnet-misc/httptunnel/files/htc31
1 files changed, 31 insertions, 0 deletions
diff --git a/net-misc/httptunnel/files/htc b/net-misc/httptunnel/files/htc
new file mode 100755
index 0000000..c06fcb1
--- /dev/null
+++ b/net-misc/httptunnel/files/htc
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header:
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting httptunnel (client)"
+
+ htc_args=""
+ if [ -n "$HTC_PROXY" ]; then
+ htc_args="$htc_args -P $HTC_PROXY"
+ fi
+
+ if [ -n "$HTC_SERVICE_PORT" ]; then
+ htc_args="$htc_args -F $HTC_SERVICE_PORT"
+ fi
+
+ start-stop-daemon --start --quiet --exec /usr/bin/htc -c nobody -- $htc_args $HTC_SERVER:$HTC_PORT
+
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping httptunnel (client)"
+ start-stop-daemon --stop --retry 5 --quiet --name htc
+ eend $?
+}