Add support for startup/shutdown.
Merge pull request #28 from vitillo/master

Add support for startup/shutdown.