public static void WriteDefaults() { xmlWriter.Write("root", "/antd"); xmlWriter.ReadValue("root"); if (xmlWriter.CheckValue("antdport") == false) { xmlWriter.Write("antdport", "7777"); } if (xmlWriter.CheckValue("antddb") == false) { xmlWriter.Write("antddb", "antd_database"); } if (xmlWriter.CheckValue("antdfr") == false) { xmlWriter.Write("antdfr", "antd_filerepo"); } if (xmlWriter.CheckValue("sysd") == false) { xmlWriter.Write("sysd", "/etc/systemd/system"); } }
public static void WriteDefaults() { if (Writer.CheckValue("AntdHttpPort") == false) { Writer.Write("AntdHttpPort", "8084"); } if (Writer.CheckValue("AntdHttpsPort") == false) { Writer.Write("AntdHttpsPort", "443"); } if (Writer.CheckValue(Parameter.LabelAntdDatabase) == false) { Writer.Write(Parameter.LabelAntdDatabase, Parameter.AntdCfgDatabase); } if (Writer.CheckValue("ssl") == false) { Writer.Write("ssl", "yes"); } if (Writer.CheckValue("certificate") == false) { Writer.Write("certificate", $"{Parameter.AntdCfg}/certificate.pfx"); } if (Writer.CheckValue("ca") == false) { Writer.Write("ca", "no"); } if (Writer.CheckValue("ca_path") == false) { Writer.Write("ca", Parameter.CertificateAuthority); } if (Writer.CheckValue("x509") == false) { Writer.Write("x509", ""); } if (Writer.CheckValue(Parameter.LabelAuthIsEnabled) == false) { Writer.Write(Parameter.LabelAuthIsEnabled, false.ToString()); } if (Writer.CheckValue("protocol") == false) { Writer.Write("protocol", "https"); } }
private static bool CheckConfiguration() { return(xmlWriter.CheckValue("networkd")); }