From c1f82290231fbb6a2e5985faa89e8fe46b4201d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Sch=C3=BCtte?= Date: Wed, 20 Aug 2014 18:18:56 +0200 Subject: [PATCH 1/3] install ntpd --- manifests/sysadmin.pp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/manifests/sysadmin.pp b/manifests/sysadmin.pp index 5ac7be0..b5f3d9f 100644 --- a/manifests/sysadmin.pp +++ b/manifests/sysadmin.pp @@ -12,12 +12,22 @@ class ff_gw::sysadmin($zabbixserver = '127.0.0.1', $muninserver = '127.0.0.1', $ # next important thing: set up apt repositories class { 'ff_gw::sysadmin::software': } + # remove cronjob cron { 'ntpdate-debian': + ensure => absent, command => '/usr/sbin/ntpdate-debian', user => root, minute => '0'; } + # replace with a real NTP daemon + package { 'ntp': + ensure => present, + } + ~> + service { 'ntp': + ensure => true, + } # user accounts create_resources('account', $accounts) From fd9498ab107a1aa9cd79509c702457f834e3b7a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Sch=C3=BCtte?= Date: Wed, 20 Aug 2014 18:24:26 +0200 Subject: [PATCH 2/3] silence cronjob --- files/root/bin/autoupdate_fastd_keys.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/files/root/bin/autoupdate_fastd_keys.sh b/files/root/bin/autoupdate_fastd_keys.sh index ae797d5..15ad96f 100644 --- a/files/root/bin/autoupdate_fastd_keys.sh +++ b/files/root/bin/autoupdate_fastd_keys.sh @@ -2,6 +2,10 @@ # Simple script to update fastd peers from git upstream # and only send HUP to fastd when changes happend. +if [[ "$1" == "-v" ]]; then + VERBOSE=1 +fi + # CONFIGURE THIS TO YOUR PEER DIRECTORY FASTD_PEERS=/etc/fastd/ffhh-mesh-vpn/peers @@ -17,11 +21,11 @@ GIT_REVISION=$(getCurrentVersion) # Automagically commit local changes # This preserves local changes -git commit -m "CRON: auto commit" +git commit --quiet -m "CRON: auto commit" # Pull latest changes from upstream -git fetch -git merge origin/master -m "Auto Merge" +git fetch --quiet +git merge origin/master --quiet -m "Auto Merge" # Get new version hash GIT_NEW_REVISION=$(getCurrentVersion) @@ -29,7 +33,7 @@ GIT_NEW_REVISION=$(getCurrentVersion) if [ $GIT_REVISION != $GIT_NEW_REVISION ] then # Version has changed we need to update - echo "Reload fastd peers" + test -n "$VERBOSE" && echo "Reload fastd peers" kill -HUP $(pidof fastd) fi From 1d222434e850c4e46a846a7466bd0fe81034e83c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Sch=C3=BCtte?= Date: Wed, 20 Aug 2014 19:06:19 +0200 Subject: [PATCH 3/3] silence cronjob, -q is not enough --- files/root/bin/autoupdate_fastd_keys.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/root/bin/autoupdate_fastd_keys.sh b/files/root/bin/autoupdate_fastd_keys.sh index 15ad96f..9be4f8f 100644 --- a/files/root/bin/autoupdate_fastd_keys.sh +++ b/files/root/bin/autoupdate_fastd_keys.sh @@ -21,7 +21,7 @@ GIT_REVISION=$(getCurrentVersion) # Automagically commit local changes # This preserves local changes -git commit --quiet -m "CRON: auto commit" +git commit --quiet -m "CRON: auto commit" > /dev/null # Pull latest changes from upstream git fetch --quiet