Replacing sys.exit calls with return values.
Values correspond to /etc/init.d/skeleton on Ubuntu.