diff options
Diffstat (limited to 'package/network/services/lldpd/files/lldpd.init')
-rw-r--r-- | package/network/services/lldpd/files/lldpd.init | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init index 5d3428388..0ef64e08e 100644 --- a/package/network/services/lldpd/files/lldpd.init +++ b/package/network/services/lldpd/files/lldpd.init @@ -26,6 +26,12 @@ start() { [ $enable_sonmp -gt 0 ] && append args '-s' [ $enable_edp -gt 0 ] && append args '-e' + user_exists lldp 121 || user_add lldp 121 129 + group_exists lldp 129 || group_add lldp 129 + + mkdir -p /var/run/lldp + chown lldp:lldp /var/run/lldp + service_start /usr/sbin/lldpd $args \ ${lldp_class:+ -M $lldp_class} @@ -37,4 +43,5 @@ start() { stop() { service_stop /usr/sbin/lldpd + rm -f /var/run/lldpd.socket /var/run/lldpd.pid } |