示例#1
0
        public static void Set()
        {
            var options = Application.CurrentConfiguration.Cluster.SharedFs;

            if (options == null)
            {
                return;
            }
            Systemctl.Enable(serviceName);
            Systemctl.Start(serviceName);
            var nodes = Application.CurrentConfiguration.Cluster.Nodes;

            for (var i = 0; i < nodes.Length; i++)
            {
                IncludeNode(nodes[i].Hostname);
            }

            for (var i = 0; i < options.VolumesLabels.Length; i++)
            {
                var currentLabel = options.VolumesLabels[i];
                //creo e avvio il volume di Gluster sui vari nodi in cui è configurato
                StartVolume(currentLabel, nodes);
            }
            ConsoleLogger.Log("[gluster] start");
        }
示例#2
0
文件: Samba.cs 项目: jeason0813/Antd
 public static void Start()
 {
     if (Systemctl.IsEnabled(ServiceName1) == false)
     {
         Systemctl.Enable(ServiceName1);
     }
     if (Systemctl.IsActive(ServiceName1) == false)
     {
         Systemctl.Restart(ServiceName1);
     }
     if (Systemctl.IsEnabled(ServiceName2) == false)
     {
         Systemctl.Enable(ServiceName2);
     }
     if (Systemctl.IsActive(ServiceName2) == false)
     {
         Systemctl.Restart(ServiceName2);
     }
     if (Systemctl.IsEnabled(ServiceName3) == false)
     {
         Systemctl.Enable(ServiceName3);
     }
     if (Systemctl.IsActive(ServiceName3) == false)
     {
         Systemctl.Restart(ServiceName3);
     }
     ConsoleLogger.Log("[samba] start");
 }
示例#3
0
 public static void Start()
 {
     if (Systemctl.IsEnabled(ServiceName) == false)
     {
         Systemctl.Enable(ServiceName);
     }
     if (Systemctl.IsActive(ServiceName) == false)
     {
         Systemctl.Restart(ServiceName);
     }
     ConsoleLogger.Log("[nginx] start");
 }
示例#4
0
 public static void Start()
 {
     if (Systemctl.IsEnabled(serviceName) == false)
     {
         Systemctl.Enable(serviceName);
     }
     if (Systemctl.IsActive(serviceName) == false)
     {
         Systemctl.Restart(serviceName);
     }
     ConsoleLogger.Log("[syslogng] start service");
 }
示例#5
0
文件: Ntp.cs 项目: jeason0813/Antd
 public static void Prepare()
 {
     Systemctl.Enable(ntpdService);
 }