summaryrefslogtreecommitdiffstats
path: root/system/ffproxy/rc.ffproxy
diff options
context:
space:
mode:
author Axel Bergerhoff2017-08-31 11:57:15 +0200
committer David Spencer2017-09-02 11:19:45 +0200
commitc91d784733bbf337f3787969cc1e4daf31eb94c6 (patch)
tree9b7b9c4793acc975c0ea75d823471b45784b29ab /system/ffproxy/rc.ffproxy
parentf4319542a2c0d58316d5b1ef1b17ead2de2666ef (diff)
downloadslackbuilds-c91d784733bbf337f3787969cc1e4daf31eb94c6.tar.gz
system/ffproxy: Added (filtering HTTP/HTTPS proxy server).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'system/ffproxy/rc.ffproxy')
-rw-r--r--system/ffproxy/rc.ffproxy40
1 files changed, 40 insertions, 0 deletions
diff --git a/system/ffproxy/rc.ffproxy b/system/ffproxy/rc.ffproxy
new file mode 100644
index 0000000000..8d023bad7d
--- /dev/null
+++ b/system/ffproxy/rc.ffproxy
@@ -0,0 +1,40 @@
+#!/bin/sh
+# Start or stop ffproxy
+
+# Start ffproxy
+ffproxy_start()
+{
+ if [ -x /usr/sbin/ffproxy ]
+ then
+ echo "Starting HTTP/HTTPS proxy server: /usr/sbin/ffproxy"
+ /usr/sbin/ffproxy -d
+ fi
+}
+
+# Stop ffproxy
+ffproxy_stop()
+{
+ killall ffproxy
+}
+
+# Restart ffproxy
+ffproxy_restart()
+{
+ ffproxy_stop
+ sleep 1
+ ffproxy_start
+}
+
+case "$1" in
+'start')
+ ffproxy_start
+ ;;
+'stop')
+ ffproxy_stop
+ ;;
+'restart')
+ ffproxy_restart
+ ;;
+*)
+ echo "usage $0 start|stop|restart"
+esac