private void refresh() { Process proc = ApacheCommands.FullStatus(); string output = proc.StandardOutput.ReadToEnd(); proc.WaitForExit(); textview1.Buffer.Text = output; }
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(); }
/* > 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"); } }
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; }