summaryrefslogtreecommitdiff
path: root/loolwsd.init.rhel6
blob: f02462f25188f0746d1d69cad3f31de539df9e5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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