mirror of
https://github.com/LibreOffice/online.git
synced 2025-07-23 00:48:13 +00:00
add init script for RHEL6/CentOS6
This commit is contained in:
@ -242,6 +242,7 @@ dist-hook:
|
||||
EXTRA_DIST = discovery.xml \
|
||||
favicon.ico \
|
||||
loolkitconfig.xcu \
|
||||
loolwsd.init.rhel6 \
|
||||
loolwsd.spec \
|
||||
loolwsd.xml.in \
|
||||
loolwsd.service \
|
||||
|
49
loolwsd.init.rhel6
Normal file
49
loolwsd.init.rhel6
Normal file
@ -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
|
Reference in New Issue
Block a user