blob: 1063bc41efd14cb6c1e520f272a1feb75c3e543b (
plain)
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
42
43
44
45
46
47
48
|
#! /bin/sh
### BEGIN INIT INFO
# Provides: mtu1280d
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: mtu1280d Synthetic ICMPv6 Packet Too Big response
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
### END INIT INFO
# Author: Jason Fesler <jfesler@gigo.com>
#
# Dumbed down init script that tries to satisify multiple OSs
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Synthetic ICMPv6 Packet Too Big response"
NAME=mtu1280d
DAEMON=/usr/sbin/$NAME
DAEMON_ARGS="-d -q 1280"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
case "$1" in
start)
$DAEMON $DAEMON_ARGS
;;
stop)
ps auxww |grep $DAEMON | grep -v grep | awk '{print $2}' | xargs kill
;;
status)
ps auxww |grep $NAME | grep -v grep
;;
reload|restart|force-reload)
ps auxww |grep $DAEMON | grep -v grep | awk '{print $2}' | xargs kill
$DAEMON $DAEMON_ARGS
;;
*)
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
exit 3
;;
esac
|