#!/bin/sh
[ -n "$IPKG_INSTROOT" ] && exit 0

was_running=0
was_enabled=0
/etc/init.d/netlog status >/dev/null 2>&1 && was_running=1
/etc/init.d/netlog enabled >/dev/null 2>&1 && was_enabled=1

/etc/init.d/netlog stop >/dev/null 2>&1

[ "$was_running" = "1" ] || [ "$was_enabled" = "1" ] && /etc/init.d/netlog start >/dev/null 2>&1
/etc/init.d/rpcd reload >/dev/null 2>&1 || true
exit 0
