[libreoffice-online] 03/05: add initial (probably not working yet) init script

Rene Engelhard rene at moszumanska.debian.org
Fri Nov 24 22:51:16 UTC 2017


This is an automated email from the git hooks/post-receive script.

rene pushed a commit to branch master
in repository libreoffice-online.

commit 585965c1fb410b444ce031a14456b9cbcc534055
Author: Rene Engelhard <rene at rene-engelhard.de>
Date:   Sun Nov 19 23:06:03 2017 +0100

    add initial (probably not working yet) init script
---
 debian/loolwsd.init | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 debian/rules        |  1 +
 2 files changed, 49 insertions(+)

diff --git a/debian/loolwsd.init b/debian/loolwsd.init
new file mode 100644
index 0000000..b30277c
--- /dev/null
+++ b/debian/loolwsd.init
@@ -0,0 +1,48 @@
+#!/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"
+
+. /lib/lsb/init-functions
+
+LOOLWSD=/usr/bin/loolwsd                                                       
+PID_FILE=/var/run/loolwsd.pid
+
+case "$1" in                                                                   
+    start)                                                                     
+        log_daemon_msg "Starting LibreOffice Online Websocket Daemon" "$prog"
+	/sbin/start-stop-daemon $args \
+		--user lool --chdir "$PWD" --exec $exec --oknodo --pidfile "$PID_FILE" -- "$LOOLWSD --o:sys_template_path=/var/lib/lool/systemplate --o:lo_template_path=/usr/lib/libreoffice --o:child_root_path=/var/lib/lool/child-roots --o:file_server_root_path=/usr/share/loolwsd --o:logging.file[@enable]=true"
+	status_of_proc -p $PID_FILE loolwd "LibreOffice Online Websocket Daemon"
+    ;;	
+    stop)                                                                     
+        log_daemon_msg "Stopping LibreOffice Online Websocket Daemon" "$prog"
+	killproc -p $PID_FILE $LOOLWSD -TERM
+	status_of_proc -p $PID_FILE loolwd "LibreOffice Online Websocket Daemon"
+    ;;	
+    restart)
+	$0 stop
+	$0 start
+    ;;
+    reload|force-reload)
+        log_daemon_msg "Reloading LibreOffice Online Websocket Daemon" "$prog"
+	killproc $LOOLWSD -HUP
+	status_of_proc -p $PID_FILE loolwd "LibreOffice Online Websocket Daemon"
+    ;;
+    status)
+	status_of_proc -p $PID_FILE loolwd "LibreOffice Online Websocket Daemon"
+    ;;
+    *)
+	echo "Usage: $0 {start|stop|status|restart|reload|force-reload}"       
+        exit 1
+    ;;
+esac
+
diff --git a/debian/rules b/debian/rules
index bc85e16..14f508d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -29,6 +29,7 @@ override_dh_auto_install:
 
 
 override_dh_installinit:
+	dh_installinit
 	cp $(CURDIR)/loolwsd.service $(CURDIR)/debian 
 	dh_installsystemd
 	dh_systemd_enable

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openoffice/libreoffice-online.git



More information about the Pkg-openoffice-commits mailing list