Merge branch 'master' of github.com:freifunkhamburg/puppet-ff_gw
This commit is contained in:
commit
e8740e0b18
|
@ -2,6 +2,10 @@
|
||||||
# Simple script to update fastd peers from git upstream
|
# Simple script to update fastd peers from git upstream
|
||||||
# and only send HUP to fastd when changes happend.
|
# and only send HUP to fastd when changes happend.
|
||||||
|
|
||||||
|
if [[ "$1" == "-v" ]]; then
|
||||||
|
VERBOSE=1
|
||||||
|
fi
|
||||||
|
|
||||||
# CONFIGURE THIS TO YOUR PEER DIRECTORY
|
# CONFIGURE THIS TO YOUR PEER DIRECTORY
|
||||||
FASTD_PEERS=/etc/fastd/ffhh-mesh-vpn/peers
|
FASTD_PEERS=/etc/fastd/ffhh-mesh-vpn/peers
|
||||||
|
|
||||||
|
@ -17,11 +21,11 @@ GIT_REVISION=$(getCurrentVersion)
|
||||||
|
|
||||||
# Automagically commit local changes
|
# Automagically commit local changes
|
||||||
# This preserves local changes
|
# This preserves local changes
|
||||||
git commit -m "CRON: auto commit"
|
git commit --quiet -m "CRON: auto commit" > /dev/null
|
||||||
|
|
||||||
# Pull latest changes from upstream
|
# Pull latest changes from upstream
|
||||||
git fetch
|
git fetch --quiet
|
||||||
git merge origin/master -m "Auto Merge"
|
git merge origin/master --quiet -m "Auto Merge"
|
||||||
|
|
||||||
# Get new version hash
|
# Get new version hash
|
||||||
GIT_NEW_REVISION=$(getCurrentVersion)
|
GIT_NEW_REVISION=$(getCurrentVersion)
|
||||||
|
@ -29,7 +33,7 @@ GIT_NEW_REVISION=$(getCurrentVersion)
|
||||||
if [ $GIT_REVISION != $GIT_NEW_REVISION ]
|
if [ $GIT_REVISION != $GIT_NEW_REVISION ]
|
||||||
then
|
then
|
||||||
# Version has changed we need to update
|
# Version has changed we need to update
|
||||||
echo "Reload fastd peers"
|
test -n "$VERBOSE" && echo "Reload fastd peers"
|
||||||
kill -HUP $(pidof fastd)
|
kill -HUP $(pidof fastd)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -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
|
# next important thing: set up apt repositories
|
||||||
class { 'ff_gw::sysadmin::software': }
|
class { 'ff_gw::sysadmin::software': }
|
||||||
|
|
||||||
|
# remove cronjob
|
||||||
cron {
|
cron {
|
||||||
'ntpdate-debian':
|
'ntpdate-debian':
|
||||||
|
ensure => absent,
|
||||||
command => '/usr/sbin/ntpdate-debian',
|
command => '/usr/sbin/ntpdate-debian',
|
||||||
user => root,
|
user => root,
|
||||||
minute => '0';
|
minute => '0';
|
||||||
}
|
}
|
||||||
|
# replace with a real NTP daemon
|
||||||
|
package { 'ntp':
|
||||||
|
ensure => present,
|
||||||
|
}
|
||||||
|
~>
|
||||||
|
service { 'ntp':
|
||||||
|
ensure => true,
|
||||||
|
}
|
||||||
|
|
||||||
# user accounts
|
# user accounts
|
||||||
create_resources('account', $accounts)
|
create_resources('account', $accounts)
|
||||||
|
|
Loading…
Reference in a new issue