1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2025-06-28 03:45:08 +03:00

Create /etc/init/softether.conf for upstart.

Create a softether.upstart file in the Debian overlay for systems that use
the upstart init subsystem.  This lets the operator control the SoftEther
daemon with commands like:

	# start softether
	# stop softether
	# status softether
	# restart softether

Also modify the softether.init file to exit early if the /etc/init/softether
file is installed.  Although the dh_installinit debhelper prefers an upstart
configuration for automatic control, it will also install the sysv script.
This commit is contained in:
Darik Horn 2014-04-21 20:48:03 -04:00
parent 2be40fb555
commit 604b2b884f
2 changed files with 31 additions and 0 deletions

View File

@ -11,6 +11,12 @@
set -e
if test -f /etc/init/softether.conf
then
echo "SoftEther is controlled by upstart." 1>&2
exit 0
fi
. /etc/default/softether
case $SOFTETHER_MODE in

25
debian/softether.upstart vendored Normal file
View File

@ -0,0 +1,25 @@
description "SoftEther VPN"
start on started networking
stop on stoppping networking
respawn
expect stop
script
test -f /etc/default/softether && . /etc/default/softether
case $SOFTETHER_MODE in
(vpnbridge)
exec /usr/sbin/vpnbridge upstart
;;
(vpnclient)
exec /usr/sbin/vpnclient upstart
;;
(vpnserver)
exec /usr/sbin/vpnserver upstart
;;
(*)
exit 0
;;
esac
end script