         }
         
         print("Writing \(path)")
-        try server.execute("echo \"\(generateServiceContents())\" > \(path)")
-    }
-    
-    func generateServiceContents() -> String {
-        return [
-            "[Unit]",
-            "Description=\"Starts the \(provider.name) server\"",
-            "",
-            "[Service]",
-            "ExecStart=\"\(Paths.executable)\"",
-            "Restart=on-failure",
-            ""
-        ].joined(separator: "\n")
+        try server.execute("echo \"\(provider.serviceFileContents)\" > \(path)")
     }
     
 }

    var serviceFileContents: String {
        return [
            "[Unit]",
            "Description=\"Starts the \(name) server\"",
            "",
            "[Service]",
            "ExecStart=\"\(Paths.executable)\"",

            try invoke("\(namespace):write-service")
        }
        print("Starting \(provider.name)")
        
        try provider.start(on: server)
    }
    
}
