mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-14 21:56:41 +01:00
287346028f
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
33 lines
338 B
Bash
33 lines
338 B
Bash
#!/bin/sh
|
|
|
|
mkdir -p /run/lldpd
|
|
|
|
lldpd_start() {
|
|
/usr/sbin/lldpd >/dev/null 2>&1
|
|
}
|
|
|
|
lldpd_stop() {
|
|
killall 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
|
|
|