]>
git.ipfire.org Git - thirdparty/lldpd.git/blob - debian/lldpd.init.d
4 # Required-Start: $remote_fs $network $syslog
5 # Required-Stop: $network $remote_fs $syslog
6 # Default-Start: 2 3 4 5
8 # Short-Description: LLDP daemon
9 # Description: lldpd is a 802.1AB implementation, a L2 network
10 # discovery protocol. It also supports CDP, EDP and
11 # various other protocols.
16 # PATH should only include /usr/* if it runs after the mountnfs.sh script
17 PATH
=/sbin
:/usr
/sbin
:/bin
:/usr
/bin
20 DAEMON
=/usr
/sbin
/$NAME
22 PIDFILE
=/var
/run
/$NAME.pid
23 SCRIPTNAME
=/etc
/init.d
/$NAME
26 # Exit if the package is not installed
27 [ -x "$DAEMON" ] ||
exit 0
29 # Read configuration variable file if it is present
30 [ -r /etc
/default
/$NAME ] && .
/etc
/default
/$NAME
33 .
/lib
/lsb
/init-functions
37 start-stop-daemon
--start --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev
/null \
39 start-stop-daemon
--start --quiet --pidfile $PIDFILE --exec $DAEMON -- \
46 start-stop-daemon
--stop --quiet --retry=TERM
/30/KILL
/5 --pidfile $PIDFILE --name $NAME
48 [ "$RETVAL" = 2 ] && return 2
49 start-stop-daemon
--stop --quiet --oknodo --retry=0/30/KILL
/5 --exec $DAEMON
50 [ "$?" = 2 ] && return 2
56 start-stop-daemon
--stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
62 [ "$VERBOSE" != no
] && log_daemon_msg
"Starting $DESC" "$NAME"
65 0|
1) [ "$VERBOSE" != no
] && log_end_msg
0 ;;
66 2) [ "$VERBOSE" != no
] && log_end_msg
1 ;;
70 [ "$VERBOSE" != no
] && log_daemon_msg
"Stopping $DESC" "$NAME"
73 0|
1) [ "$VERBOSE" != no
] && log_end_msg
0 ;;
74 2) [ "$VERBOSE" != no
] && log_end_msg
1 ;;
78 log_daemon_msg
"Reloading $DESC" "$NAME"
83 log_daemon_msg
"Restarting $DESC" "$NAME"
90 1) log_end_msg
1 ;; # Old process is still running
91 *) log_end_msg
1 ;; # Failed to start
101 status_of_proc
$DAEMON $NAME -p $PIDFILE && exit 0 ||
exit $?
104 echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload|status}" >&2