Example #1
0
 private static void Rsync()
 {
     if (CurrentConfiguration.Services.Rsync.Active)
     {
         RsyncWatcher.Start();
     }
 }
Example #2
0
        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);
            };
        }