Adapted for Andreas' changes for --user and --pidfile.