private static void Rsync() { if (CurrentConfiguration.Services.Rsync.Active) { RsyncWatcher.Start(); } }
public RsyncModule() : base("/rsync") { Post["/apply"] = x => { RsyncWatcher.Start(); return(HttpStatusCode.OK); }; Post["/set"] = x => { string data = Request.Form.Data; var objects = JsonConvert.DeserializeObject <RsyncModel>(data); Application.CurrentConfiguration.Services.Rsync = objects; ConfigRepo.Save(); return(HttpStatusCode.OK); }; }