Skip to content

Instantly share code, notes, and snippets.

@oc
Created June 7, 2009 21:49
Show Gist options
  • Save oc/125507 to your computer and use it in GitHub Desktop.
Save oc/125507 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ $UID = 0 ]
then
script=$0
test -f $script || script=$(pwd)/$(basename $0)
/usr/bin/sudo -u oc -H $script "$*"
exit
fi
echo "HI: $(/usr/bin/whoami) $*"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment