More bug fixes and added a new Debian init script

Still doesn't try to manage the service yet, and we still need a template
for RHEL derivatives.