summaryrefslogtreecommitdiff
path: root/unmaintained/strata/ntpd/ntpd.morph
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2016-10-31 15:35:03 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2016-11-11 17:36:41 +0900
commit82d358156d80fabb06702023178445ec90b7ada9 (patch)
treeb6783c139d95c608dc7bf1ce85e5a213a4397cf4 /unmaintained/strata/ntpd/ntpd.morph
parentec458e22d52b15458636a1f550e55e92a4fee962 (diff)
downloaddefinitions-82d358156d80fabb06702023178445ec90b7ada9.tar.gz
Moving unmaintained systems, clusters and their strata to unmaintained directory
This includes ceph, chef, cxmanage, java, openstack, nodejs, ocaml, qt4, qt5 (system only, qt5 is used by ivi projects), swift, web, xfce and zookeeper systems. All strata which is referred to exclusively by systems and clusters in the unmaintained directory have also been moved to the unmaintained directory. Change-Id: If60b0fa8bc1d7f9c53137fa7106b396668682a9a
Diffstat (limited to 'unmaintained/strata/ntpd/ntpd.morph')
-rw-r--r--unmaintained/strata/ntpd/ntpd.morph51
1 files changed, 51 insertions, 0 deletions
diff --git a/unmaintained/strata/ntpd/ntpd.morph b/unmaintained/strata/ntpd/ntpd.morph
new file mode 100644
index 00000000..762762c7
--- /dev/null
+++ b/unmaintained/strata/ntpd/ntpd.morph
@@ -0,0 +1,51 @@
+name: ntpd
+kind: chunk
+build-system: autotools
+configure-commands:
+- ./configure --prefix="$PREFIX" --enable-linuxcaps
+post-install-commands:
+- |
+ cat > ntpd.service << EOF
+ [Unit]
+ Description=Network Time Service
+ After=network.target nss-lookup.target
+ Conflicts=systemd-timesyncd.service
+
+ [Service]
+ Type=forking
+ ExecStart=/usr/bin/ntpd -u ntp:ntp -Ng
+ PrivateTmp=True
+ Restart=on-failure
+
+ [Install]
+ WantedBy=multi-user.target
+ EOF
+- install -D -m 644 ntpd.service "$DESTDIR"/lib/systemd/system/ntpd.service
+- mkdir -p "$DESTDIR"/lib/systemd/system/multi-user.target.wants
+- ln -s /lib/systemd/system/ntpd.service "$DESTDIR"/lib/systemd/system/multi-user.target.wants/ntpd.service
+- |
+ cat > ntp.conf << EOF
+ # We use iburst here to reduce the potential initial delay to set the clock
+ server 0.pool.ntp.org iburst
+ server 1.pool.ntp.org iburst
+ server 2.pool.ntp.org iburst
+ server 3.pool.ntp.org iburst
+
+ # kod - notify client when packets are denied service,
+ # rather than just dropping the packets
+ #
+ # nomodify - deny queries which attempt to modify the state of the server
+ #
+ # notrap - decline to provide mode 6 control message trap service to
+ # matching hosts
+ #
+ # see ntp.conf(5) for more details
+ restrict -4 default limit kod notrap nomodify
+ restrict -6 default limit kod notrap nomodify
+ EOF
+- install -D -m 644 ntp.conf "$DESTDIR"/etc/ntp.conf
+system-integration:
+ ntpd-misc:
+ 00-add-ntpd-user:
+ - groupadd -r ntp
+ - useradd -g ntp -d /home/ntp -s /bin/false -r ntp