File: iked.sh

package info (click to toggle)
libreswan 5.2-2.4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 81,656 kB
  • sloc: ansic: 129,988; sh: 32,018; xml: 20,646; python: 10,303; makefile: 3,022; javascript: 1,506; sed: 574; yacc: 511; perl: 264; awk: 52
file content (20 lines) | stat: -rwxr-xr-x 285 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh

if test $# -ne 1 ; then
    echo "usage: $0 {start,stop}" 1>&2
    exit 1
fi

case $1 in
    start )
	/sbin/iked -dv >> /tmp/iked.log 2>&1 & sleep 1
	echo $! > /tmp/iked.pid
	;;
    stop )
	kill `cat /tmp/iked.pid`
	;;
    * )
	echo "unrecongized: $1" 1>&2
	exit 1
	;;
esac