Added startup and shutdown commands for macosx.