softether-vpnserver.init 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #! /bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides: softether-vpnserver
  4. # Required-Start: $network $remote_fs $syslog
  5. # Required-Stop: $network $remote_fs $syslog
  6. # Should-Start: network-manager
  7. # Should-Stop: network-manager
  8. # X-Start-Before: $x-display-manager gdm kdm xdm wdm ldm sdm nodm
  9. # X-Interactive: true
  10. # Default-Start: 2 3 4 5
  11. # Default-Stop: 0 1 6
  12. # Short-Description: SoftEther VPN service
  13. ### END INIT INFO
  14. #
  15. # Author: Dmitry Orlov <[email protected]>
  16. # From Debian skeleton (Tom deLombarde)
  17. #
  18. set -e
  19. PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/qmsys/bin
  20. DAEMON=/usr/bin/vpnserver
  21. NAME=vpnserver
  22. DESC="SoftEtherVPN Server"
  23. PIDFILE=/var/run/$NAME.pid
  24. SCRIPTNAME=/etc/init.d/$NAME
  25. # Gracefully exit if the package has been removed.
  26. test -x $DAEMON || exit 0
  27. # Read config file if it is present.
  28. #if [ -r /etc/default/$NAME ]
  29. #then
  30. # . /etc/default/$NAME
  31. #fi
  32. case "$1" in
  33. start)
  34. echo -n "Starting $DESC: $NAME"
  35. $DAEMON start
  36. echo "."
  37. ;;
  38. stop)
  39. echo -n "Stopping $DESC: $NAME"
  40. $DAEMON stop
  41. echo "."
  42. ;;
  43. #reload)
  44. #
  45. # If the daemon can reload its config files on the fly
  46. # for example by sending it SIGHUP, do it here.
  47. #
  48. # If the daemon responds to changes in its config file
  49. # directly anyway, make this a do-nothing entry.
  50. #
  51. # echo -n "Reloading $DESC configuration..."
  52. # start-stop-daemon --stop --signal 1 --quiet --pidfile \
  53. # $PIDFILE --exec $DAEMON
  54. # echo "done."
  55. #;;
  56. restart|force-reload)
  57. #
  58. # If the "reload" option is implemented, move the "force-reload"
  59. # option to the "reload" entry above. If not, "force-reload" is
  60. # just the same as "restart".
  61. #
  62. echo -n "Restarting $DESC: $NAME"
  63. $DAEMON stop
  64. sleep 1
  65. $DAEMON start
  66. echo "."
  67. ;;
  68. *)
  69. # echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
  70. echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
  71. exit 1
  72. ;;
  73. esac
  74. exit 0