public static void Enable() { var s = new TorConfigurationModel { IsActive = true, Services = ServiceModel.Services }; var text = JsonConvert.SerializeObject(s, Formatting.Indented); FileWithAcl.WriteAllText(CfgFile, text, "644", "root", "wheel"); ConsoleLogger.Log("[tor] enabled"); }
public static void Save(List <TorService> model) { var s = new TorConfigurationModel { IsActive = ServiceModel.IsActive, Services = model }; var text = JsonConvert.SerializeObject(s, Formatting.Indented); FileWithAcl.WriteAllText(CfgFile, text, "644", "root", "wheel"); ConsoleLogger.Log("[tor] configuration saved"); }