From 9b4ac20589f87769a68aab85e14b5528fef80c77 Mon Sep 17 00:00:00 2001 From: Darren 'Tadgy' Austin Date: Sat, 3 Sep 2022 20:16:28 +0100 Subject: [PATCH] Update warn-git-status to work from /. --- base-files/cron.daily/warn-git-status | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/base-files/cron.daily/warn-git-status b/base-files/cron.daily/warn-git-status index 1688d66..7132e3a 100755 --- a/base-files/cron.daily/warn-git-status +++ b/base-files/cron.daily/warn-git-status @@ -1,10 +1,10 @@ #!/bin/bash -source /etc/mail.conf "etc-git" || exit 1 +source /etc/mail.conf "git-status" || exit 1 -ETCSTATUS="$(cd /etc && git status | egrep -ve "^(On branch|Your branch|No commits|nothing|$)" -e "\(use")" +CONFIGSTATUS="$(cd / && git status | egrep -ve "^(On branch|Your branch|No commits|nothing|$)" -e "\(use")" TEMPLATESTATUS="$(cd /etc/slackpkg/templates && git status | egrep -ve "^(On branch|Your branch|No commits|nothing|$)" -e "\(use")" -[[ -z "$ETCSTATUS" ]] && [[ -z "$TEMPLATESTATUS" ]] && exit 0 +[[ -z "$CONFIGSTATUS" ]] && [[ -z "$TEMPLATESTATUS" ]] && exit 0 -mailx "${MAILX_ARGS[@]}" -r "$EMAIL_FROM" -s "/etc git status" "${EMAIL_TO[@]}" <<<"${ETCSTATUS:+$ETCSTATUS$'\n'$'\n'}$TEMPLATESTATUS" +mailx "${MAILX_ARGS[@]}" -r "$EMAIL_FROM" -s "git statuses" "${EMAIL_TO[@]}" <<<"${CONFIGSTATUS:+$CONFIGSTATUS$'\n'$'\n'}$TEMPLATESTATUS"