Any reason not to enable an ntp listener

I like being able to give ntp access to otherwise firewalled subnet and I see that the rout10 is already running an ntp daemon. Is this a reasonable addition to post-cfg.sh?

if [ "$(uci get system.ntp.enable_server)" != "1" ]; then
    uci set system.ntp.enable_server="1"
    uci commit system
    /etc/init.d/sysntpd restart
fi

Sure, that shouldn’t cause any problems, from what I can tell, though a reload may be less intrusive, if it works.

1 Like

Thanks. And yes, reload works fine.

root@route10:~# cat /cfg/post-cfg.sh 
#!/bin/sh
if [ "$(uci get system.ntp.enable_server)" != "1" ]; then
    uci set system.ntp.enable_server="1"
    uci commit system
    /etc/init.d/sysntpd reload
fi
root@route10:~# netstat -l |grep ntp
udp        0      0 :::ntp                  :::*                                
root@route10:~# 


1 Like