Created
January 26, 2020 19:22
-
-
Save 85degree/e584f18f694f727b4b6074b082889ddc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: softether-vpnserver | |
# Required-Start: $network $remote_fs $syslog | |
# Required-Stop: $network $remote_fs $syslog | |
# Should-Start: network-manager | |
# Should-Stop: network-manager | |
# X-Start-Before: $x-display-manager gdm kdm xdm wdm ldm sdm nodm | |
# X-Interactive: true | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: SoftEther VPN service | |
### END INIT INFO | |
# chkconfig: 2345 99 01 | |
# description: SoftEther VPN Server | |
DAEMON=/usr/local/vpnserver/vpnserver | |
LOCK=/var/lock/vpnserver | |
test -x $DAEMON || exit 0 | |
case "$1" in | |
start) | |
$DAEMON start | |
touch $LOCK | |
;; | |
stop) | |
$DAEMON stop | |
rm $LOCK | |
;; | |
restart) | |
$DAEMON stop | |
sleep 3 | |
$DAEMON start | |
;; | |
*) | |
echo "Usage: $0 {start|stop|restart}" | |
exit 1 | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment