summaryrefslogtreecommitdiff
path: root/debian/cron.daily
blob: 91e2ed48f3e20c630fe1f909a1832fe52a967e7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
set -e
if [ -x /usr/bin/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