add hostname update

This commit is contained in:
vvzvlad 2023-04-17 01:46:56 +07:00
parent 535dde06d8
commit 4f6d7f9551
2 changed files with 2 additions and 0 deletions

View File

@ -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

View File

@ -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/