import repository from arizona
[raven.git] / owl / client / scripts.d / owl
1 #!/bin/bash
2
3 echo '[owl]'
4
5 pidfile="/var/run/owl.pid"
6 binfile="/usr/bin/owl"
7
8 version="NA"
9 if [ -x $binfile ]; then
10     tmp=`$binfile --version | awk '{print $2}'`
11     if [ $?  -eq 0 ]; then
12         version=$tmp
13     fi
14 fi
15
16 echo "version=$version"
17
18 status="not running"
19 if [ -e $pidfile ]; then
20     pid=`cat $pidfile`
21     ps -p $pid > /dev/null
22     if [ $? -eq 0 ]; then
23         status="running"
24     fi
25 fi
26
27 echo "status=$status"
28