libreoffice-online/coolwsd.init.rhel6
Andras Timar f07ff8c7e0 rename: remaining lool->cool changes
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib7d4e804bebe52dead8d53b0e0bbaed0f08bf3d0
2021-11-18 14:14:11 +01:00

49 lines
937 B
Bash

#!/bin/bash
#
# chkconfig: 35 90 12
# description: coolwsd server
#
# Get function from functions library
. /etc/init.d/functions
# Start the service coolwsd
start() {
echo -n $"Starting coolwsd server: "
su cool -c "/usr/bin/coolwsd --version --o:logging.file[@enable]=true" &
### Create the lock file ###
touch /var/lock/subsys/coolwsd
success $"coolwsd server startup"
echo
}
# Stop the service coolwsd
stop() {
echo -n $"Stopping coolwsd server: "
killproc coolwsd
### Now, delete the lock file ###
rm -f /var/lock/subsys/coolwsd
echo
}
### main logic ###
case "$1" in
start)
start
;;
stop)
stop
;;
status)
status coolwsd
;;
restart|reload|condrestart)
stop
start
;;
*)
echo $"Usage: $0 {start|stop|restart|reload|status}"
exit 1
esac
exit 0