summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Gonzalez Iniesta <agi@inittab.org>2014-09-12 13:46:35 +0200
committerAlberto Gonzalez Iniesta <agi@inittab.org>2014-09-12 13:46:35 +0200
commit7da248bd2e88b7a7ebf2da80fb5ead53edf38e26 (patch)
treeb33ebf89eec7ecd4f17be1b9ed7b4d7cccaa1b56
parent1f5bd7321e8029fa05f9e7f46a9a9a2e7568656f (diff)
Removed deprecated openvpn-systemd-helper
-rwxr-xr-xdebian/openvpn-systemd-helper88
1 files changed, 0 insertions, 88 deletions
diff --git a/debian/openvpn-systemd-helper b/debian/openvpn-systemd-helper
deleted file mode 100755
index 66b2fb3..0000000
--- a/debian/openvpn-systemd-helper
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2014 Alberto Gonzalez Iniesta <agi@inittab.org>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-
-#
-# This scripts tries to mimic the behaviour of the SysV init script
-# in systemd. It's an alternative to declaring an instance for each
-# VPN you want to start on boot
-#
-
-test $DEBIAN_SCRIPT_DEBUG && set -v -x
-
-DAEMON=/usr/sbin/openvpn
-CONFIG_DIR=/etc/openvpn
-test -x $DAEMON || exit 0
-test -d $CONFIG_DIR || exit 0
-
-# Source defaults file; edit that file to configure this script.
-AUTOSTART="all"
-STATUSREFRESH=10
-STATUS=0
-VPNS=""
-if test -e /etc/default/openvpn ; then
- . /etc/default/openvpn
-fi
-
-# Nothing to do if no VPN is set in AUTOSTART
-if test "x$AUTOSTART" = "xnone" -o -z "$AUTOSTART" ; then
- exit 0
-fi
-
-# Create list with VPNs to be managed
-if test -z "$AUTOSTART" -o "x$AUTOSTART" = "xall" ; then
- # all of them
- for CONFIG in `cd $CONFIG_DIR; ls *.conf 2> /dev/null`; do
- NAME=${CONFIG%%.conf}
- VPNS="$VPNS $NAME"
- done
-else
- # only manage specified VPNs
- for NAME in $AUTOSTART ; do
- [ -e "${CONFIG_DIR}/${NAME}.conf" ] && VPNS="$VPNS $NAME"
- done
-fi
-
-case "$1" in
-start)
- for NAME in $VPNS ; do
- systemctl start openvpn@${NAME}
- [ "$?" -ne 0 ] && { echo "Error starting $NAME"; STATUS=1; }
- done
-;;
-stop)
- for NAME in $VPNS ; do
- systemctl stop openvpn@${NAME}
- [ "$?" -ne 0 ] && { echo "Error stopping $NAME"; STATUS=1; }
- done
-;;
-# Only 'reload' running VPNs. New ones will only start with 'start' or 'restart'.
-reload)
- for NAME in $VPNS ; do
- # If openvpn if running under a different user than root we'll need to restart
- if egrep '^[[:blank:]]*user[[:blank:]]' $CONFIG_DIR/$NAME.conf > /dev/null 2>&1 ; then
- systemctl restart openvpn@${NAME}
- [ "$?" -ne 0 ] && { echo "Error restarting $NAME"; STATUS=1; }
- else
- systemctl reload openvpn@${NAME}
- fi
- done
- ;;
-*)
- echo "Usage: $0 {start|stop|reload}" >&2
- exit 1
- ;;
-esac
-
-exit $STATUS
-
-# vim:set ai sts=2 sw=2 tw=0: