Esempio n. 1
0
    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);
    }
Esempio n. 2
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"));
        }
Esempio n. 3
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());
        }
Esempio n. 4
0
	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;
	}
Esempio n. 5
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 ());
                }
Esempio n. 6
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"));
		}