slackbuilds_ponce/network/lldpd/rc.lldpd
Thibaut Notteboom 12c5fb16be
network/lldpd: Updated for version 1.0.7.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2020-12-26 11:30:44 +07:00

33 lines
344 B
Bash

#!/bin/sh
mkdir -p /run/lldpd
lldpd_start() {
/usr/sbin/lldpd >/dev/null 2>&1
}
lldpd_stop() {
killall lldpd
}
lldpd_restart() {
lldpd_stop
sleep 1
lldpd_start
}
case "$1" in
'start')
lldpd_start
;;
'stop')
lldpd_stop
;;
'restart')
lldpd_restart
;;
*)
echo "Usage: $0 start|stop|restart"
;;
esac