Created
October 23, 2014 18:46
-
-
Save nohtyp/91bbc4f8b898d54d6b30 to your computer and use it in GitHub Desktop.
This script goes to choice.py script that deals with remote management(I use puppet now..:-) )
This file contains hidden or 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 | |
| case $0 in | |
| *create) | |
| answer="chage -l $1;$?" | |
| if [ "$answer | awk -F';' '{ print $2 }' == 0" ]; then | |
| #echo "The command was sent to $HOSTNAME successfully!" | |
| echo "The command was sent to $HOSTNAME successfully!" | |
| chage -l $1 | |
| else | |
| echo "The command failed to send to $HOSTNAME!" | |
| fi;; | |
| *delete) answer="removeme -r $1" ;; | |
| esac | |
| #echo $answer | awk -F';' '{print $1}'> thomas.test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment