[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loolwsd.init loolwsd.init.rhel6 loolwsd.init.sle11 loolwsd.spec.in Makefile.am
Andras Timar
andras.timar at collabora.com
Mon Aug 14 14:09:14 UTC 2017
Makefile.am | 3 +-
loolwsd.init.sle11 | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++
loolwsd.spec.in | 8 ++++--
3 files changed, 76 insertions(+), 3 deletions(-)
New commits:
commit 041f64173fa5df5fe395452a30a2c4f9f63667e8
Author: Andras Timar <andras.timar at collabora.com>
Date: Fri Aug 11 14:08:27 2017 +0200
Init script for SLE11SP4
Change-Id: I26be775b52ef727f83ec12f87ad2f612d25add92
Reviewed-on: https://gerrit.libreoffice.org/41035
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/Makefile.am b/Makefile.am
index 50919d61..d69f1448 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -190,7 +190,8 @@ dist-hook:
EXTRA_DIST = discovery.xml \
favicon.ico \
loolkitconfig.xcu \
- loolwsd.init \
+ loolwsd.init.rhel6 \
+ loolwsd.init.sle11 \
loolwsd.spec \
loolwsd.xml.in \
loolwsd.service \
diff --git a/loolwsd.init b/loolwsd.init.rhel6
similarity index 100%
rename from loolwsd.init
rename to loolwsd.init.rhel6
diff --git a/loolwsd.init.sle11 b/loolwsd.init.sle11
new file mode 100644
index 00000000..92440748
--- /dev/null
+++ b/loolwsd.init.sle11
@@ -0,0 +1,68 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: loolwsd
+# Default-Start: 3 5
+# Default-Stop: 0 1 2 4 6
+# Short-Description: LibreOffice Online Websocket Daemon
+# Description: LibreOffice Online Websocket Daemon
+### END INIT INFO
+
+RETVAL=0
+prog="loolwsd"
+
+# Source function library.
+. /etc/rc.status
+rc_reset
+
+LOOLWSD=/usr/bin/loolwsd
+PID_FILE=/var/run/loolwsd.pid
+
+case "$1" in
+ start)
+ echo -n "Starting $prog "
+ /sbin/startproc -u lool -p $PID_FILE $LOOLWSD --version --o:sys_template_path=/opt/lool/systemplate --o:lo_template_path=/opt/collaboraoffice5.3 --o:child_root_path=/opt/lool/child-roots --o:file_server_root_path=/usr/share/loolwsd --o:logging.file[@enable]=true 2>/dev/null
+ rc_status -v
+ ;;
+
+ stop)
+ echo -n "Shutting down $prog "
+ /sbin/killproc -p $PID_FILE $LOOLWSD -TERM
+ rc_status -v
+ ;;
+
+ restart)
+ $0 stop
+ $0 start
+ rc_status
+ ;;
+
+ reload)
+ echo -n "Reload service $prog "
+ killproc $LOOLWSD -HUP
+ rc_status -v
+ ;;
+
+ force-reload)
+ $0 reload
+ ;;
+
+ status)
+ echo -n "Checking for service $prog"
+ /sbin/checkproc $LOOLWSD
+ rc_status -v
+ ;;
+
+ condrestart|try-restart)
+ $0 status
+ if test $? = 0; then
+ $0 restart
+ else
+ rc_reset # Not running is not a failure.
+ fi
+ rc_status
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
+ exit 1
+esac
+rc_exit
diff --git a/loolwsd.spec.in b/loolwsd.spec.in
index ed120148..3ad0f851 100644
--- a/loolwsd.spec.in
+++ b/loolwsd.spec.in
@@ -108,9 +108,13 @@ env BUILDING_FROM_RPMBUILD=yes make %{?_smp_mflags}
%install
env BUILDING_FROM_RPMBUILD=yes make install DESTDIR=%{buildroot}
install -d -m 755 %{buildroot}/var/adm/fillup-templates
-%if 0%{?rhel} == 6 || 0%{?suse_version} == 1110
+%if 0%{?rhel} == 6
+install -d -m 755 %{buildroot}/etc/init.d
+install -D -m 755 loolwsd.init.rhel6 %{buildroot}/etc/init.d/loolwsd
+%endif
+%if 0%{?suse_version} == 1110
install -d -m 755 %{buildroot}/etc/init.d
-install -D -m 755 loolwsd.init %{buildroot}/etc/init.d/loolwsd
+install -D -m 755 loolwsd.init.sle11 %{buildroot}/etc/init.d/loolwsd
%endif
%if 0%{?fedora} || 0%{?rhel} >= 7
install -D -m 444 loolwsd.service %{buildroot}%{_unitdir}/loolwsd.service
More information about the Libreoffice-commits
mailing list