Skip to content

Instantly share code, notes, and snippets.

@sijad
Created October 16, 2016 18:45
Show Gist options
  • Save sijad/d6657e0312b67144c782ddbbe4bfa51d to your computer and use it in GitHub Desktop.
Save sijad/d6657e0312b67144c782ddbbe4bfa51d to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
# if [[ $(id -u) -ne 0 ]] ; then sudo -s ; fi
CONFIG="$HOME/proximac.json"
if [ ! -z $1 ]; then
CONFIG="$1"
fi
if [ ! -f "$CONFIG" ]; then
echo "Config file not found!"
exit 1
fi
sudo kextload /usr/local/proximac/proximac.kext
if [ $? -ne 0 ]; then
echo "Kernel extension cannot be loaded!"
echo "Maybe it is already loaded so you have to unload it first."
echo "Or installing third-party kext is not allowed on your OS."
exit 1
fi
sudo /usr/local/proximac/proximac-cli -c "$CONFIG"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment