[Libreoffice-commits] online.git: loolwsd.init.rhel6 Makefile.am
Andras Timar (via logerrit)
logerrit at kemper.freedesktop.org
Thu Sep 12 16:34:07 UTC 2019
Makefile.am | 1 +
loolwsd.init.rhel6 | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 50 insertions(+)
New commits:
commit 99f76c7b2b2a86e3b9ef9f295482bb792c498886
Author: Andras Timar <andras.timar at collabora.com>
AuthorDate: Thu Sep 12 18:33:22 2019 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Sep 12 18:33:22 2019 +0200
add init script for RHEL6/CentOS6
diff --git a/Makefile.am b/Makefile.am
index bb9b5631a..b30e6bfe9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -242,6 +242,7 @@ dist-hook:
EXTRA_DIST = discovery.xml \
favicon.ico \
loolkitconfig.xcu \
+ loolwsd.init.rhel6 \
loolwsd.spec \
loolwsd.xml.in \
loolwsd.service \
diff --git a/loolwsd.init.rhel6 b/loolwsd.init.rhel6
new file mode 100644
index 000000000..f02462f25
--- /dev/null
+++ b/loolwsd.init.rhel6
@@ -0,0 +1,49 @@
+#!/bin/bash
+#
+# chkconfig: 35 90 12
+# description: loolwsd server
+#
+
+# Get function from functions library
+. /etc/init.d/functions
+
+# Start the service loolwsd
+start() {
+ echo -n $"Starting loolwsd server: "
+ su lool -c "/usr/bin/loolwsd --version --o:logging.file[@enable]=true" &
+ ### Create the lock file ###
+ touch /var/lock/subsys/loolwsd
+ success $"loolwsd server startup"
+ echo
+}
+
+# Stop the service loolwsd
+stop() {
+ echo -n $"Stopping loolwsd server: "
+ killproc loolwsd
+ ### Now, delete the lock file ###
+ rm -f /var/lock/subsys/loolwsd
+ echo
+}
+
+### main logic ###
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ status)
+ status loolwsd
+ ;;
+ restart|reload|condrestart)
+ stop
+ start
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart|reload|status}"
+ exit 1
+esac
+
+exit 0
More information about the Libreoffice-commits
mailing list