mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-06-28 11:55: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
|
#!/bin/sh
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
# Provides: softether-vpn
|
# Provides: softether
|
||||||
# Required-Start: $local_fs $remote_fs $network $syslog $named
|
# Required-Start: $local_fs $remote_fs $network $syslog $named
|
||||||
# Required-Stop: $local_fs $remote_fs $network $syslog $named
|
# Required-Stop: $local_fs $remote_fs $network $syslog $named
|
||||||
# Default-Start: 2 3 4 5
|
# Default-Start: 2 3 4 5
|
||||||
@ -11,14 +11,11 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if test -f /etc/init/softether.conf
|
if test -f /etc/default/softether
|
||||||
then
|
then
|
||||||
echo "SoftEther is controlled by upstart." 1>&2
|
. /etc/default/softether
|
||||||
exit 0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. /etc/default/softether
|
|
||||||
|
|
||||||
case $SOFTETHER_MODE in
|
case $SOFTETHER_MODE in
|
||||||
(vpnbridge)
|
(vpnbridge)
|
||||||
;;
|
;;
|
||||||
@ -34,11 +31,11 @@ esac
|
|||||||
case $1 in
|
case $1 in
|
||||||
(start)
|
(start)
|
||||||
start-stop-daemon --verbose --oknodo --start --background --exec \
|
start-stop-daemon --verbose --oknodo --start --background --exec \
|
||||||
"/usr/sbin/$SOFTETHER_MODE" -- execsvc
|
/usr/sbin/softetherd -- "$SOFTETHER_MODE"
|
||||||
;;
|
;;
|
||||||
(stop)
|
(stop)
|
||||||
start-stop-daemon --verbose --oknodo --stop --exec \
|
start-stop-daemon --verbose --oknodo --stop --exec \
|
||||||
"/usr/sbin/$SOFTETHER_MODE" -- execsvc
|
/usr/sbin/softetherd -- "$SOFTETHER_MODE"
|
||||||
;;
|
;;
|
||||||
(restart)
|
(restart)
|
||||||
"$0" stop && "$0" start
|
"$0" stop && "$0" start
|
||||||
|
14
debian/softether.upstart
vendored
14
debian/softether.upstart
vendored
@ -9,17 +9,9 @@ expect stop
|
|||||||
script
|
script
|
||||||
test -f /etc/default/softether && . /etc/default/softether
|
test -f /etc/default/softether && . /etc/default/softether
|
||||||
case $SOFTETHER_MODE in
|
case $SOFTETHER_MODE in
|
||||||
(vpnbridge)
|
(vpnbridge|vpnclient|vpnserver)
|
||||||
exec /usr/sbin/vpnbridge upstart
|
exec /usr/sbin/softetherd "$SOFTETHER_MODE" ;;
|
||||||
;;
|
|
||||||
(vpnclient)
|
|
||||||
exec /usr/sbin/vpnclient upstart
|
|
||||||
;;
|
|
||||||
(vpnserver)
|
|
||||||
exec /usr/sbin/vpnserver upstart
|
|
||||||
;;
|
|
||||||
(*)
|
(*)
|
||||||
exit 0
|
exit 0 ;;
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
end script
|
end script
|
||||||
|
Loading…
Reference in New Issue
Block a user