Example #1
0
        private static void Procedures()
        {
            Logger.Info("[config] procedures");
            if (!Parameter.IsUnix)
            {
                return;
            }

            #region [    Users    ]
            var manageMaster = new ManageMaster();
            manageMaster.Setup();
            if (Parameter.IsUnix)
            {
                UserConfiguration.Import();
                UserConfiguration.Set();
            }
            Logger.Info("users config ready");
            #endregion

            #region [    Host Configuration    ]
            HostConfiguration.ApplyHostInfo();
            Logger.Info("host configured");
            #endregion

            #region [    Name Service    ]
            HostConfiguration.ApplyNsHosts();
            HostConfiguration.ApplyNsNetworks();
            HostConfiguration.ApplyNsResolv();
            HostConfiguration.ApplyNsSwitch();
            Logger.Info("name service ready");
            #endregion

            #region [    Network    ]
            NetworkConfiguration.Start();
            NetworkConfiguration.ApplyDefaultInterfaceSetting();
            #endregion

            #region [    Firewall    ]
            if (FirewallConfiguration.IsActive())
            {
                FirewallConfiguration.Set();
            }
            #endregion

            #region [    Dhcpd    ]
            if (DhcpdConfiguration.IsActive())
            {
                DhcpdConfiguration.Set();
            }
            #endregion

            #region [    Bind    ]
            if (BindConfiguration.IsActive())
            {
                BindConfiguration.Set();
            }
            #endregion
        }