aboutsummaryrefslogtreecommitdiff
path: root/network/windscribe/rc.windscribe
diff options
context:
space:
mode:
authorReza Talebi <reza.talebi.73@outlook.com>2020-03-14 06:34:39 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-03-14 06:34:52 +0700
commita7756bc0da0c42617dfdeef87ddca4eca4c85329 (patch)
tree5f8c64740fd6807bdeefa20af6d73bf5c5351773 /network/windscribe/rc.windscribe
parent516a405d6ab55ce3b827b9edbf41f40a2f292fa4 (diff)
network/windscribe: Added (Browse the web privately).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/windscribe/rc.windscribe')
-rw-r--r--network/windscribe/rc.windscribe79
1 files changed, 79 insertions, 0 deletions
diff --git a/network/windscribe/rc.windscribe b/network/windscribe/rc.windscribe
new file mode 100644
index 0000000000000..8341cd89c134f
--- /dev/null
+++ b/network/windscribe/rc.windscribe
@@ -0,0 +1,79 @@
+#!/usr/bin/env bash
+
+
+
+PRGNAM=windscribe
+PID=/var/run/$PRGNAM.pid
+DAEMON=/usr/bin/windscribe
+
+
+#
+# Function that starts the daemon
+#
+windscribe_start()
+{
+ if [ -s $PID ]; then
+ echo "$PRGNAM is already running: $(cat $PID)"
+ exit 1
+ fi
+
+ if [ -x $DAEMON ]; then
+ $DAEMON start
+ pidof $DAEMON > $PID
+ fi
+}
+
+#
+# Function that stops the daemon
+#
+windscribe_stop()
+{
+ if [ -s $PID ]; then
+ $DAEMON stop
+ rm -rf $PID
+ else
+ echo "$PRGNAM is not running."
+ fi
+}
+
+#
+# Function that restarts the daemon
+#
+windscribe_restart()
+{
+ windscribe_stop
+ sleep 1
+ windscribe_start
+}
+
+#
+# Function that shows the current status of the daemon
+#
+windscribe_status()
+{
+ if [ -s $PID ]; then
+ echo "$PRGNAM is running: $(cat $PID)"
+ else
+ echo "$PRGNAM is not running."
+ fi
+}
+
+
+case "$1" in
+ start)
+ windscribe_start
+ ;;
+ stop)
+ windscribe_stop
+ ;;
+ restart)
+ windscribe_restart
+ ;;
+ status)
+ windscribe_status
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart|status}"
+ exit 1
+ ;;
+esac