public static int Main(string[] args) { if (Array.IndexOf(args, "--help") > -1) { VersionFu.PrintHeader(); return(0); } if (Array.IndexOf(args, "--version") > -1) { VersionFu.PrintVersion(); return(0); } ShutdownRequest request = new ShutdownRequest(); try { request.Send(); } catch { Console.WriteLine("ERROR: The Beagle daemon does not appear to be running"); return(1); } return(0); }
private void OnStopDaemon() { notification_area.Hide(); ShutdownRequest request = new ShutdownRequest(); try { request.Send(); } catch (Beagle.ResponseMessageException) { // beagled is not running NotificationMessage m = new NotificationMessage(); m.Icon = Gtk.Stock.DialogError; m.Title = Catalog.GetString("Stopping service failed"); m.Message = Catalog.GetString("Service was not running!"); notification_area.Display(m); // show the start daemon if the user wants to start the daemom pages.CurrentPage = pages.PageNum(startdaemon); return; } catch (Exception e) { Console.WriteLine("Stopping the Beagle daemon failed: {0}", e.Message); } // beagled was running and should be now stopped. // Show the start page. The start-daemon page feels as if the user-request failed. pages.CurrentPage = pages.PageNum(quicktips); this.statusbar.Pop(0); this.statusbar.Push(0, Catalog.GetString("Search service stopped")); }
public static void ReplaceExisting() { Log.Always("Attempting to replace another beagrepd."); do { ShutdownRequest request = new ShutdownRequest(); Logger.Log.Info("Sending Shutdown"); request.Send(); // Give it a second to shut down the messaging server Thread.Sleep(1000); } while (!StartServer()); }
public static int Main (string[] args) { if (Array.IndexOf (args, "--help") > -1) { VersionFu.PrintHeader (); return 0; } if (Array.IndexOf (args, "--version") > -1) { VersionFu.PrintVersion (); return 0; } ShutdownRequest request = new ShutdownRequest (); try { request.Send (); } catch { Console.WriteLine ("ERROR: The Beagle daemon does not appear to be running"); return 1; } return 0; }
public static void ReplaceExisting () { Log.Always ("Attempting to replace another beagrepd."); do { ShutdownRequest request = new ShutdownRequest (); Logger.Log.Info ("Sending Shutdown"); request.Send (); // Give it a second to shut down the messaging server Thread.Sleep (1000); } while (! StartServer ()); }
private void OnStopDaemon () { notification_area.Hide (); ShutdownRequest request = new ShutdownRequest (); try { request.Send (); } catch (Beagle.ResponseMessageException) { // beagled is not running NotificationMessage m = new NotificationMessage (); m.Icon = Gtk.Stock.DialogError; m.Title = Catalog.GetString ("Stopping service failed"); m.Message = Catalog.GetString ("Service was not running!"); notification_area.Display (m); // show the start daemon if the user wants to start the daemom pages.CurrentPage = pages.PageNum (startdaemon); return; } catch (Exception e) { Console.WriteLine ("Stopping the Beagle daemon failed: {0}", e.Message); } // beagled was running and should be now stopped. // Show the start page. The start-daemon page feels as if the user-request failed. pages.CurrentPage = pages.PageNum (quicktips); this.statusbar.Pop (0); this.statusbar.Push (0, Catalog.GetString ("Search service stopped")); }