Ubuntu Pastebin

Paste from selinuxium at Wed, 16 Sep 2015 13:18:47 +0000

Download as text
 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
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/relativity/RelRM12.06
DAEMON=/usr/relativity/RelRM12.06/reldbsrv
NAME=relativity
DESC=relativity

RELATIVITY=$(which /usr/relativity/RelRM12.06/reldbsrv)
RELATIVITY_PID=$(ps auxf | grep /usr/relativity/RelRM12.06/odbc.ini | grep -v grep | awk '{print $2}')

SIMBAINIPATH=/usr/relativity/RelRM12.06/

RELPATH=/usr/relativity/RelRM12.06/

case "$1" in
        start)
                if [ -z "${RELATIVITY_PID}" ]; then
                        echo "starting relativity"

                        if [ -f ${RELPATH}server.log ]; then
                                mv ${RELPATH}server.log ${RELPATH}server.log.sav
                        fi

                        ${RELATIVITY} ${RELPATH}odbc.ini </dev/null >${RELPATH}server.log 2>&1 &
                        echo "Relativity started"
                else
                        echo ${RELATIVITY}
                        echo "Relativity is already running"
                fi
        ;;
        stop)
                if [ -n "${RELATIVITY_PID}" ]; then
                        kill ${RELATIVITY_PID}
                        echo "Relativity stopped"
                else
                        echo "Relativity is not running"
                fi
        ;;
        restart)
                $0 stop
                sleep 1
                $0 start
        ;;
        *)
                echo "usage: $0 {start|stop|restart}"
        ;;
esac

exit 0
Download as text