Skip to content

Instantly share code, notes, and snippets.

Index: files/usr/local/bin/concatsnippets.sh
===================================================================
--- files/usr/local/bin/concatsnippets.sh (revision 1208)
+++ files/usr/local/bin/concatsnippets.sh (working copy)
@@ -84,7 +84,13 @@
cd ${WORKDIR}
# find all the files in the snippets directory, sort them numerically and concat to snippets.concat in the working dir
-/usr/bin/find snippets/ -type f -print0 |/usr/bin/sort ${SORTARG}|/usr/bin/xargs -0 /bin/cat >|"snippets.concat"
+rm -f snippets.concat snippets.list
Index: files/usr/local/bin/concatsnippets.sh
===================================================================
--- files/usr/local/bin/concatsnippets.sh (revision 1208)
+++ files/usr/local/bin/concatsnippets.sh (working copy)
@@ -84,7 +84,13 @@
cd ${WORKDIR}
# find all the files in the snippets directory, sort them numerically and concat to snippets.concat in the working dir
-/usr/bin/find snippets/ -type f -print0 |/usr/bin/sort ${SORTARG}|/usr/bin/xargs -0 /bin/cat >|"snippets.concat"
+rm -f snippets.concat snippets.list
#!/bin/sh
export RAILS_ENV=production
cd ${0%/*}/..
stuck=`script/runner 'puts Delayed::Job.count(:conditions => "attempts > 10")'`
if [ $? != 0 ]; then
echo "UNKNOWN: Error finding delayed jobs"
exit 3
elif [ "$stuck" -ge "10" ]; then
class puppetmaster {
$branch = $fqdn ? {
'puppet1.hetzner.africa' => 'trunk',
default => 'branches/production',
}
cron { puppetmaster_clean_reports:
ensure => absent,
user => puppet,
command => "find /var/lib/puppetmaster/reports/ -type f -mtime +14 -print0 | xargs --no-run-if-empty -0 rm -f",
minute => 0,
[email protected]
<% if fqdn == "puppet1.hetzner.africa" -%>
0 1 * * * puppet find /var/lib/puppetmaster/reports/ -type f -mtime +14 -print0 | xargs --no-run-if-empty -0 rm -f
0 * * * * puppet /usr/local/hetzner/bin/fetch_hos_server
<% else -%>
*/15 6-14 * * 1-5 root /usr/local/hetzner/bin/puppet-svn-update <%= branch %>
0 1 * * * puppet find /var/lib/puppetmaster/reports/ -type f -mtime +14 -print0 | xargs --no-run-if-empty -0 rm -f
<% end -%>
msynctool --sync default --filter-objtype note --filter-objtype todo --filter-objtype contact
#!/bin/sh
set -e
tmpfile=`mktemp -t hos_server.XXXXXXXXXX` || exit 1
chmod 600 $tmpfile
chown puppet:puppet $tmpfile
scp [email protected]:hos_server $tmpfile
mv $tmpfile /etc/puppet/files/usr/local/hetzner/etc/hos_server
Edit /etc/hostname
* Fix hostname
Edit /etc/hosts
* Uncomment own address line
* Fix address
* Fix hostname
/etc/network/interfaces
* Uncomment config for eth0
* Change type for eth0 from dhcp to static
ifdown eth0
Edit /etc/hostname
* Fix hostname
Edit /etc/hosts
* Uncomment own address line
* Fix address
* Fix hostname
/etc/network/interfaces
* Uncomment config for eth0
* Change type for eth0 from dhcp to static
ifdown eth0
Edit /etc/hostname
* Fix hostname
Edit /etc/hosts
* Uncomment own address line
* Fix address
* Fix hostname
Edit /etc/network/interfaces
* Uncomment config for eth0
* Change type for eth0 from dhcp to static
Edit /etc/puppet/puppet.conf