Changeset - ee406aac7d24
[Not reviewed]
0 1 0
Branko Majic (branko) - 4 years ago 2020-06-29 04:17:04
branko@majic.rs
Fixed the etckeeper command call.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general) First comment
configuration/etckeeper_notifier.sh
Show inline comments
 
@@ -110,25 +110,25 @@ directory="$1"
 

	
 
# Verify arguments
 
if [[ ! -d "$directory" ]]; then
 
    echo "No such directory: '$directory'" >&2
 
    exit 2
 
fi
 
# Verify that etckeeper is available.
 
if [[ ! -f $etckeeper ]]; then
 
    echo "The etckeeper was not found in location: '$etckeeper'." >&2
 
    exit 2
 
fi
 

	
 
if "$etckeeper" -d "$directory"; then
 
if "$etckeeper" unclean -d "$directory"; then
 
    mail -s "Uncommited changes on '$(hostname -f)' in '$directory'" $notificationRecipients <<EOF
 
Uncommitted changes have been detected on server $(hostname -f) in directory:
 

	
 
$directory
 

	
 
Please log-in onto the server, and either undo the changes, or commit the
 
changes using a descriptive comment.
 

	
 
Do not reply to this mail. This is an automated message.
 
EOF
 
fi
 

	
0 comments (0 inline, 0 general) First comment
You need to be logged in to comment. Login now