Start/stop internet sharing from a script?
To start Internet Sharing from the CLI:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.InternetSharing.plist


To stop, change the load to unload.

Note that if you have the pref pane open when you run this you will not see the change take effect immediately (the UI won't update), but it does work.