func (self *Upstart) RenderHelperTemplate(service procfile.Service) string { data := make(map[string]interface{}) data["working_directory"] = service.Options.WorkingDirectory data["env"] = exporter.RenderEnvClause(service.Options.Env) data["cmd"] = service.Cmd return exporter.RenderTemplate("helper", helperTemplate, data) }
func (sys *Systemd) RenderServiceTemplate(appName string, service procfile.Service) string { data := make(map[string]interface{}) data["app_name"] = appName data["cmd_name"] = service.Name data["kill_timeout"] = service.Options.KillTimeout data["respawn_interval"] = service.Options.Respawn.Interval data["respawn_count"] = service.Options.Respawn.Count data["user"] = service.Options.User data["group"] = service.Options.Group data["helper_path"] = service.HelperPath data["working_directory"] = service.Options.WorkingDirectory data["log_path"] = service.Options.LogPath data["env"] = exporter.RenderEnvClause(service.Options.Env) return exporter.RenderTemplate("service", serviceTemplate, data) }