aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/freenas/pkg/freenas_services.inc18
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/freenas/pkg/freenas_services.inc b/packages/freenas/pkg/freenas_services.inc
index 184be1ec..5c206413 100644
--- a/packages/freenas/pkg/freenas_services.inc
+++ b/packages/freenas/pkg/freenas_services.inc
@@ -1621,6 +1621,24 @@ EOD;
file_put_contents("/usr/local/etc/avahi/services/rsync.service", $rsyncservice);
} // end if
+
+ /* add ntp service type */
+ if ($config['ntpd']['mode'] == "server") {
+ $ntpdservice = str_replace("@PORT@",
+ "123",
+ $service_template);
+ $ntpdservice = str_replace("@TYPE@",
+ "_ntp._udp",
+ $ntpdservice);
+ $ntpdservice = str_replace("@SERVICE_DESC@",
+ "Network Time Daemon",
+ $ntpdservice);
+ $ntpdservice = str_replace("@TXT_RECORDS@",
+ "",
+ $ntpdservice);
+
+ file_put_contents("/usr/local/etc/avahi/services/ntpd.service", $ntpdservice);
+ } // end if
if (isset($config['system']['ssh']['enable'])) {
$sshservice = str_replace("@PORT@",