[Groonga-commit] droonga/droonga-engine at 031cba5 [master] Detect installed but stopped service correctly

Back to archive index

YUKI Hiroshi null+****@clear*****
Thu Sep 18 14:02:58 JST 2014


YUKI Hiroshi	2014-09-18 14:02:58 +0900 (Thu, 18 Sep 2014)

  New Revision: 031cba5f9ee6296c64e405bb1af17ace7feafdc9
  https://github.com/droonga/droonga-engine/commit/031cba5f9ee6296c64e405bb1af17ace7feafdc9

  Message:
    Detect installed but stopped service correctly

  Modified files:
    bin/droonga-engine-configure

  Modified: bin/droonga-engine-configure (+7 -3)
===================================================================
--- bin/droonga-engine-configure    2014-09-18 13:57:15 +0900 (d22be4b)
+++ bin/droonga-engine-configure    2014-09-18 14:02:58 +0900 (06d4241)
@@ -43,9 +43,13 @@ parser.parse!(ARGV)
 
 
 def installed_as_service?
-  system("service", "droonga-engine", "status",
-         :out => "/dev/null",
-         :err => "/dev/null")
+  succeeded = system("service", "droonga-engine", "status",
+                     :out => "/dev/null",
+                     :err => "/dev/null")
+  return true if succeeded
+
+  result = `SYSTEMCTL_SKIP_REDIRECT=yes service droonga-engine status`
+  result.include?("droonga-engine is stopped")
 end
 
 def service_user_name
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index