refactored to use upstart only on ubuntu