-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathiked
executable file
·41 lines (34 loc) · 1.01 KB
/
iked
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /bin/sh -e
### BEGIN INIT INFO
# Provides: IKE daemon
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Description: start and stop the Shrew Soft IKE daemon
### END INIT INFO
test -x /usr/sbin/iked || exit 0
. /lib/lsb/init-functions
export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
case "$1" in
start)
log_begin_msg "Starting Shrew Soft IKE daemon..."
start-stop-daemon --start --quiet --exec /usr/sbin/iked || log_end_msg 1
log_end_msg 0
;;
stop)
log_begin_msg "Stopping Shrew Soft IKE daemon..."
start-stop-daemon --stop --quiet --oknodo --exec /usr/sbin/iked || log_end_msg 1
log_end_msg 0
;;
restart)
log_begin_msg "Restarting Shrew Soft IKE daemon..."
start-stop-daemon --stop --quiet --oknodo --retry 30 --exec /usr/sbin/iked || log_end_msg 1
start-stop-daemon --start --quiet --exec /usr/sbin/iked || log_end_msg 1
log_end_msg 0
;;
*)
log_success_msg "Usage: /etc/init.d/iked {start|stop|restart}"
exit 1
esac
exit 0