PageRenderTime 4ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/cron.daily/etckeeper

http://github.com/brinkman83/bashrc
Shell | 14 lines | 13 code | 0 blank | 1 comment | 7 complexity | 0a136e3760b0cc5587277955085ab732 MD5 | raw file
 1#!/bin/sh
 2set -e
 3if [ -x /usr/sbin/etckeeper ] && [ -e /etc/etckeeper/etckeeper.conf ]; then
 4	. /etc/etckeeper/etckeeper.conf
 5	if [ "$AVOID_DAILY_AUTOCOMMITS" != "1" ]; then
 6		if [ "$VCS" = hg ]; then
 7			hostname=`hostname -f 2>/dev/null || hostname`
 8			export HGUSER=cron@$hostname
 9		fi
10		if etckeeper unclean; then
11			etckeeper commit "daily autocommit" >/dev/null
12		fi
13	fi
14fi