mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-06-28 20:05: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:
parent
2be40fb555
commit
604b2b884f
6
debian/softether.init
vendored
6
debian/softether.init
vendored
@ -11,6 +11,12 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if test -f /etc/init/softether.conf
|
||||||
|
then
|
||||||
|
echo "SoftEther is controlled by upstart." 1>&2
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
. /etc/default/softether
|
. /etc/default/softether
|
||||||
|
|
||||||
case $SOFTETHER_MODE in
|
case $SOFTETHER_MODE in
|
||||||
|
25
debian/softether.upstart
vendored
Normal file
25
debian/softether.upstart
vendored
Normal 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
|
Loading…
Reference in New Issue
Block a user