From 394f6381ddd0aa93e72376585c19452dbae4999c Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Tue, 23 Jun 2015 13:11:29 +0200 Subject: [PATCH] Fixed ICE-6630 - use systemd scripts on Ubuntu 15.04 --- dpkg/control | 3 ++- dpkg/rules | 19 +++++++---------- ...ter => zeroc-glacier2.glacier2router.init} | 0 dpkg/zeroc-glacier2.glacier2router.service | 19 +++++++++++++++++ dpkg/zeroc-glacier2.install | 2 -- ...ridnode => zeroc-icegrid.icegridnode.init} | 0 dpkg/zeroc-icegrid.icegridnode.service | 20 ++++++++++++++++++ ...try => zeroc-icegrid.icegridregistry.init} | 0 dpkg/zeroc-icegrid.icegridregistry.service | 21 +++++++++++++++++++ dpkg/zeroc-icegrid.install | 3 --- 10 files changed, 69 insertions(+), 18 deletions(-) rename dpkg/{zeroc-glacier2.glacier2router => zeroc-glacier2.glacier2router.init} (100%) create mode 100644 dpkg/zeroc-glacier2.glacier2router.service rename dpkg/{zeroc-icegrid.icegridnode => zeroc-icegrid.icegridnode.init} (100%) create mode 100644 dpkg/zeroc-icegrid.icegridnode.service rename dpkg/{zeroc-icegrid.icegridregistry => zeroc-icegrid.icegridregistry.init} (100%) create mode 100644 dpkg/zeroc-icegrid.icegridregistry.service diff --git a/dpkg/control b/dpkg/control index a7e5d03..fc5e262 100644 --- a/dpkg/control +++ b/dpkg/control @@ -11,7 +11,8 @@ Build-Depends: debhelper (>= 9.0.0), oracle-java7-installer, php5-dev, php5-cli, - javahelper (>= 0.45) + javahelper (>= 0.45), + dh-systemd (>= 1.3) Standards-Version: 3.9.4 Homepage: https://zeroc.com diff --git a/dpkg/rules b/dpkg/rules index b9ffd3a..4ac042b 100755 --- a/dpkg/rules +++ b/dpkg/rules @@ -84,7 +84,7 @@ icebox_install: @echo usr/share/man/man1/icebox.1 >> $(CURDIR)/debian/zeroc-icebox.install %: - dh $@ --parallel --with php5 --with javahelper + dh $@ --parallel --with php5 --with javahelper --with systemd override_dh_auto_build-arch: if [ ! -d cpp11 ]; then cp -r cpp cpp11; fi @@ -113,6 +113,11 @@ override_dh_auto_clean-indep: override_dh_auto_test: +override_dh_installinit: + dh_installinit --noscripts --name icegridregistry + dh_installinit --noscripts --name icegridnode + dh_installinit --noscripts --name glacier2router + override_dh_install: icebox_install # @@ -130,7 +135,7 @@ override_dh_install: icebox_install mkdir -p $(DESTDIR)$(prefix)/lib/$(DEB_HOST_MULTIARCH)/c++11 # - # Move C++11 libarries and binaries to their locations + # Move C++11 libraries and binaries to their locations # for name in $(CPP11_LIB_NAMES) ; \ do \ @@ -151,16 +156,6 @@ override_dh_install: icebox_install cp debian/zeroc-icegrid.icegridnode.conf $(DESTDIR)/etc/icegridnode.conf cp debian/zeroc-icegrid.icegridregistry.conf $(DESTDIR)/etc/icegridregistry.conf - mkdir -p $(DESTDIR)/etc/init.d - cp debian/zeroc-glacier2.glacier2router $(DESTDIR)/etc/init.d/glacier2router - chmod 755 $(DESTDIR)/etc/init.d/glacier2router - - cp debian/zeroc-icegrid.icegridnode $(DESTDIR)/etc/init.d/icegridnode - chmod 755 $(DESTDIR)/etc/init.d/icegridnode - - cp debian/zeroc-icegrid.icegridregistry $(DESTDIR)/etc/init.d/icegridregistry - chmod 755 $(DESTDIR)/etc/init.d/icegridregistry - mkdir -p $(DESTDIR)/var/lib/ice/icegrid/registry mkdir -p $(DESTDIR)/var/lib/ice/icegrid/node1 diff --git a/dpkg/zeroc-glacier2.glacier2router b/dpkg/zeroc-glacier2.glacier2router.init similarity index 100% rename from dpkg/zeroc-glacier2.glacier2router rename to dpkg/zeroc-glacier2.glacier2router.init diff --git a/dpkg/zeroc-glacier2.glacier2router.service b/dpkg/zeroc-glacier2.glacier2router.service new file mode 100644 index 0000000..f01a071 --- /dev/null +++ b/dpkg/zeroc-glacier2.glacier2router.service @@ -0,0 +1,19 @@ +# +# Copyright (c) 2007-2015 ZeroC, Inc. All rights reserved. +# + +[Unit] +Description=The Glacier2 router daemon.\ +Glacier2 is the firewall traversal service for the Internet\ +Communications Engine (Ice). +Documentation=man:glacier2router(1) +Documentation=https://doc.zeroc.com/display/Ice/Getting+Started+with+Glacier2 +After=syslog.target network.target icegridregistry.service icegridnode.service + +[Service] +ExecStart=/usr/bin/glacier2router --Ice.Config=/etc/glacier2router.conf +KillMode=process +User=ice + +[Install] +WantedBy=multi-user.target diff --git a/dpkg/zeroc-glacier2.install b/dpkg/zeroc-glacier2.install index 8a7c450..ad360e4 100644 --- a/dpkg/zeroc-glacier2.install +++ b/dpkg/zeroc-glacier2.install @@ -1,5 +1,3 @@ -etc/init.d/glacier2router - etc/glacier2router.conf usr/bin/glacier2router diff --git a/dpkg/zeroc-icegrid.icegridnode b/dpkg/zeroc-icegrid.icegridnode.init similarity index 100% rename from dpkg/zeroc-icegrid.icegridnode rename to dpkg/zeroc-icegrid.icegridnode.init diff --git a/dpkg/zeroc-icegrid.icegridnode.service b/dpkg/zeroc-icegrid.icegridnode.service new file mode 100644 index 0000000..b241bf4 --- /dev/null +++ b/dpkg/zeroc-icegrid.icegridnode.service @@ -0,0 +1,20 @@ +# +# Copyright (c) 2007-2015 ZeroC, Inc. All rights reserved. +# + +[Unit] +Description=The IceGrid node daemon.\ +IceGrid is the server deployment and monitoring for the Internet\ +Communications Engine (Ice). An IceGrid domain consists of one master\ +registry, zero or more slave registries, and zero or more IceGrid nodes. +Documentation=man:icegridnode(1) +Documentation=https://doc.zeroc.com/display/Ice/icegridnode +After=syslog.target network.target icegridregistry.service + +[Service] +ExecStart=/usr/bin/icegridnode --Ice.Config=/etc/icegridnode.conf +KillMode=process +User=ice + +[Install] +WantedBy=multi-user.target diff --git a/dpkg/zeroc-icegrid.icegridregistry b/dpkg/zeroc-icegrid.icegridregistry.init similarity index 100% rename from dpkg/zeroc-icegrid.icegridregistry rename to dpkg/zeroc-icegrid.icegridregistry.init diff --git a/dpkg/zeroc-icegrid.icegridregistry.service b/dpkg/zeroc-icegrid.icegridregistry.service new file mode 100644 index 0000000..3b7672d --- /dev/null +++ b/dpkg/zeroc-icegrid.icegridregistry.service @@ -0,0 +1,21 @@ +# +# Copyright (c) 2007-2015 ZeroC, Inc. All rights reserved. +# + +[Unit] +Description=The IceGrid registry daemon.\ +IceGrid is the server deployment and monitoring for the Internet\ +Communications Engine (Ice). An IceGrid domain consists of one master\ +registry, zero or more slave registries, and zero or more IceGrid nodes. +Documentation=man:icegridregistry(1) +Documentation=https://doc.zeroc.com/display/Ice/icegridregistry +Before=icegridnode.service +After=syslog.target network.target + +[Service] +ExecStart=/usr/bin/icegridregistry --Ice.Config=/etc/icegridregistry.conf +KillMode=process +User=ice + +[Install] +WantedBy=multi-user.target diff --git a/dpkg/zeroc-icegrid.install b/dpkg/zeroc-icegrid.install index 04faa55..930a300 100644 --- a/dpkg/zeroc-icegrid.install +++ b/dpkg/zeroc-icegrid.install @@ -1,6 +1,3 @@ -etc/init.d/icegridnode -etc/init.d/icegridregistry - etc/icegridnode.conf etc/icegridregistry.conf