#!/bin/sh if [ "-start" = "$1" ]; then echo "Starting VNC service..." /Applications/RealVNC/VNC\ Server.app/Contents/MacOS/vncserver_service exit 1 fi if [ "-stop" = "$1" ]; then echo "Stopping VNC service..." /Library/vnc/vncserver -service -stop exit 0 fi echo "Usage: sudo ./vnc.sh [-start | -stop]"