Skip to content

Instantly share code, notes, and snippets.

@nickrobinson
Created July 7, 2014 19:39
Show Gist options
  • Save nickrobinson/ef4d81d3e12c65e0ae49 to your computer and use it in GitHub Desktop.
Save nickrobinson/ef4d81d3e12c65e0ae49 to your computer and use it in GitHub Desktop.
unmount_vm_old_web.sh
#!/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