[Groonga-commit] droonga/droonga-http-server at 95ef812 [master] Define register_service()

Back to archive index

KITAITI Makoto null+****@clear*****
Mon Jan 11 20:07:32 JST 2016


KITAITI Makoto	2016-01-11 20:07:32 +0900 (Mon, 11 Jan 2016)

  New Revision: 95ef8129f40c2785b98755e27bf2229d2c2d429c
  https://github.com/droonga/droonga-http-server/commit/95ef8129f40c2785b98755e27bf2229d2c2d429c

  Merged 0f9441b: Merge pull request #13 from KitaitiMakoto/systemd

  Message:
    Define register_service()

  Modified files:
    install.sh

  Modified: install.sh (+10 -0)
===================================================================
--- install.sh    2016-01-11 19:39:20 +0900 (9e61c22)
+++ install.sh    2016-01-11 20:07:32 +0900 (32d496f)
@@ -313,7 +313,17 @@ installed_version() {
   $NAME --version
 }
 
+register_service() {
+  local unit=$NAME.service
 
+  curl -s -o /usr/lib/systemd/system/$unit $(download_url "install/$unit")
+  if [ $? -ne 0 ]; then
+    echo "ERROR: Failed to download systemd unit file!"
+    exit 1
+  fi
+
+  /usr/bin/systemctl enable $unit
+}
 
 # ====================== for Debian/Ubuntu ==========================
 prepare_environment_in_debian() {
-------------- next part --------------
HTML����������������������������...
Download 



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