Пример #1
0
        private void refresh()
        {
            Process proc   = ApacheCommands.FullStatus();
            string  output = proc.StandardOutput.ReadToEnd();

            proc.WaitForExit();
            textview1.Buffer.Text = output;
        }
Пример #2
0
        public ApachePanel()
        {
            this.Build();

            versionLabel.Text = ApacheCommands.getVersion();
            if (ApacheCommands.isRunning())
            {
                statusLabel1.Text = "On";
                //(cell as Gtk.CellRendererText).Foreground = "darkgreen";
            }
            else
            {
                statusLabel1.Text = "Off";
            }

            initMods();
            initSites();
        }
Пример #3
0
        /* > General
         * ************************************************************* */

        public static string getVersion()
        {
            Process proc   = ApacheCommands.Status();
            string  output = proc.StandardOutput.ReadToEnd();

            proc.WaitForExit();

            var regex = new Regex(@"Server Version: (.*)");
            var match = regex.Match(output);

            if (match.Success)
            {
                return(match.Groups[1].Value);
            }
            else
            {
                return("Unknown");
            }
        }
Пример #4
0
        public void changeStatus()
        {
            if (active)
            {
                ApacheCommands.DeactivateModuleAndReload(name);
            }
            else
            {
                ApacheCommands.ActivateModuleAndReload(name);
            }

            /*Process proc = new Process();
             * if (active)
             *      proc = ApacheCommands.DeactivateModule(name);
             * else
             *      proc = ApacheCommands.ActivateModule(name);
             *
             * proc.Exited += delegate(object sender, EventArgs e) {
             *      ApacheCommands.Reload();
             * };*/
            active = !active;
        }