Created
July 7, 2014 19:39
-
-
Save nickrobinson/ef4d81d3e12c65e0ae49 to your computer and use it in GitHub Desktop.
unmount_vm_old_web.sh
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/sh | |
CODE_SUCCESS=0 | |
CODE_FAILURE=10 | |
CODE_FAILURE_ARG=11 | |
RETVAL=${CODE_FAILURE_ARG} | |
if [ $# -eq 0 ]; then | |
RETVAL=${CODE_SUCCESS} | |
fi | |
if [ ${RETVAL} -eq ${CODE_SUCCESS} ]; then | |
/bin/umount /flash/nonvol/ &>/dev/null | |
/bin/ip netns exec "vrf0" apachectl stop &>/dev/null | |
sleep 3 | |
/bin/ip netns exec "vrf0" apachectl start &>/dev/null | |
else | |
echo "invalid arguments" >&2 | |
fi | |
exit $RETVAL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment