Skip to content

Instantly share code, notes, and snippets.

@realtebo
Created August 19, 2019 07:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save realtebo/b69e2bd0cef04e548b85ee7bb3ef00a6 to your computer and use it in GitHub Desktop.
Save realtebo/b69e2bd0cef04e548b85ee7bb3ef00a6 to your computer and use it in GitHub Desktop.
chustom_check_git
#!/bin/bash
cd /var/www/credit-sales
git status --porcelain | grep php >> /dev/null
if [ $? -gt 0 ]; then
echo "CRITICAL, folder credit-sales modified"
exit 2
fi
echo "OK, nothing modified"
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment