From 4f6d7f955177ab9dc98649c12e34c4f2be0b602f Mon Sep 17 00:00:00 2001 From: vvzvlad Date: Mon, 17 Apr 2023 01:46:56 +0700 Subject: [PATCH] add hostname update --- files/pushgit.sh | 1 + files/pushgit_inotify.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/files/pushgit.sh b/files/pushgit.sh index f5d385d..e816c09 100644 --- a/files/pushgit.sh +++ b/files/pushgit.sh @@ -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 diff --git a/files/pushgit_inotify.sh b/files/pushgit_inotify.sh index 02e7d78..86d8940 100644 --- a/files/pushgit_inotify.sh +++ b/files/pushgit_inotify.sh @@ -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/