-
-
Save gplv2/2227703 to your computer and use it in GitHub Desktop.
Automatic operations on logout from a server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## | |
## Commit configuration files. | |
## | |
if [ ! -d /etc/.git ]; then | |
cd /etc | |
git init | |
git config user.name "Server Administrator" | |
git config user.email "root@localhost" | |
fi | |
git --work-tree=/etc --git-dir=/etc/.git add . >/dev/null 2>&1 | |
git --work-tree=/etc --git-dir=/etc/.git commit -a -m "Logout commit `date +%c`" >/dev/null 2>&1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment