summaryrefslogtreecommitdiff
path: root/debian/cron.daily
blob: e83b5707a0821bdee61d24535e9ed8c9f3534b19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
set -e
if [ -x /usr/sbin/etckeeper ] && [ -e /etc/etckeeper/etckeeper.conf ]; then
	. /etc/etckeeper/etckeeper.conf
	if [ "$AVOID_DAILY_AUTOCOMMITS" != "1" ]; then
		# avoid autocommit if an install run is in progress
		if [ ! -e /var/cache/etckeeper/packagelist.pre-install ]; then
			if etckeeper unclean; then
				etckeeper commit "daily autocommit" >/dev/null
			fi
		fi
	fi
fi