change the logic for checking if it's being run as an upstart job