mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-06-28 03:45:08 +03:00
Update init files for softetherd.
The check for an upstart configuration in the sysv script is reverted because upstart and start-stop-daemon can both control the same softetherd instance.
This commit is contained in:
parent
604b2b884f
commit
61d215e1c8
13
debian/softether.init
vendored
13
debian/softether.init
vendored
@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
### BEGIN INIT INFO
|
||||
# Provides: softether-vpn
|
||||
# Provides: softether
|
||||
# Required-Start: $local_fs $remote_fs $network $syslog $named
|
||||
# Required-Stop: $local_fs $remote_fs $network $syslog $named
|
||||
# Default-Start: 2 3 4 5
|
||||
@ -11,13 +11,10 @@
|
||||
|
||||
set -e
|
||||
|
||||
if test -f /etc/init/softether.conf
|
||||
if test -f /etc/default/softether
|
||||
then
|
||||
echo "SoftEther is controlled by upstart." 1>&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
. /etc/default/softether
|
||||
fi
|
||||
|
||||
case $SOFTETHER_MODE in
|
||||
(vpnbridge)
|
||||
@ -34,11 +31,11 @@ esac
|
||||
case $1 in
|
||||
(start)
|
||||
start-stop-daemon --verbose --oknodo --start --background --exec \
|
||||
"/usr/sbin/$SOFTETHER_MODE" -- execsvc
|
||||
/usr/sbin/softetherd -- "$SOFTETHER_MODE"
|
||||
;;
|
||||
(stop)
|
||||
start-stop-daemon --verbose --oknodo --stop --exec \
|
||||
"/usr/sbin/$SOFTETHER_MODE" -- execsvc
|
||||
/usr/sbin/softetherd -- "$SOFTETHER_MODE"
|
||||
;;
|
||||
(restart)
|
||||
"$0" stop && "$0" start
|
||||
|
14
debian/softether.upstart
vendored
14
debian/softether.upstart
vendored
@ -9,17 +9,9 @@ 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
|
||||
;;
|
||||
(vpnbridge|vpnclient|vpnserver)
|
||||
exec /usr/sbin/softetherd "$SOFTETHER_MODE" ;;
|
||||
(*)
|
||||
exit 0
|
||||
;;
|
||||
exit 0 ;;
|
||||
esac
|
||||
end script
|
||||
|
Loading…
Reference in New Issue
Block a user