add hostname update

master
vvzvlad 1 year ago
parent 535dde06d8
commit 4f6d7f9551

@ -1,4 +1,5 @@
#!/usr/bin/env sh
echo $(hostname) > /mnt/data/etc/vestasync/hostname
export GIT_AUTHOR_NAME="vestasync_wb_$(hostname)"
export GIT_COMMITTER_NAME="vestasync_wb_$(hostname)"
cd /mnt/data/etc/ > /dev/null 2>&1 || true

@ -3,6 +3,7 @@ EXCLUDE_PATTERN='(^|/)(\.git($|/)|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
echo $(hostname) > /mnt/data/etc/vestasync/hostname
export GIT_AUTHOR_NAME="vestasync_wb_$(hostname)_inotify"
export GIT_COMMITTER_NAME="vestasync_wb_$(hostname)_inotify"
cd /mnt/data/etc/

Loading…
Cancel
Save