prerm script manage service gracefully