eventscripts: Simplify handling of $service name in "managed" functions