You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
410 B
Bash

#!/usr/bin/env bash
export GIT_AUTHOR_NAME="vestasync_wb_$(hostname)"
export GIT_COMMITTER_NAME="vestasync_wb_$(hostname)"
export LC_TIME=en_GB.UTF-8
EXCLUDE_PATTERN='(^|\/)(\.git|packages|hostname|wb-mqtt-mbgate\.conf|resolv\.conf)($|\/)'
inotifywait -m -r -e close_write,move,create,delete --exclude "$EXCLUDE_PATTERN" --format '%w%f' /mnt/data/etc | while read FILE
do
/usr/local/bin/pushgit.sh
done