--- /dev/null
+#!/bin/sh
+
+PN=nagios-config
+PV=$(date +%Y%m%d)
+
+files="
+checkcommands.cfg contactgroups.cfg contacts.cfg dependencies.cfg
+escalations.cfg hostextinfo.cfg hostgroups.cfg hosts.cfg misccommands.cfg
+serviceextinfo.cfg services.cfg timeperiods.cfg
+"
+
+s=0
+pkg=$PN-$PV
+while [ -f $pkg.tar.bz2 ]; do
+ s=$((s + 1))
+ pkg=$PN-$PV.$s
+done
+
+mkdir -p $pkg
+cp -a $files $pkg
+tar cjf $pkg.tar.bz2 --remove-files $pkg
+rmdir $pkg
+
+echo "Created: $pkg.tar.bz2"