updated on Thu Jan 12 08:01:00 UTC 2012
[aur-mirror.git] / firebird-ss / firebird
blob9a97ad0079491fa1363322f76bf313d717f4b622
1 #!/bin/bash
3 daemon_name=firebird
4 pidfile=/var/run/$daemon_name.pid
5 manager=/opt/firebird/bin/fbmgr.bin
6 runas=root
8 . /etc/rc.conf
9 . /etc/rc.d/functions
11 case "$1" in
12 start)
13 stat_busy "Starting $daemon_name daemon"
15 su - $runas -c "$manager -pidfile $pidfile -start -forever > /dev/null 2>&1"
17 if [ $? -gt 0 ]; then
18 stat_fail
19 exit 1
20 else
21 add_daemon $daemon_name
22 stat_done
26 stop)
27 stat_busy "Stopping $daemon_name daemon"
29 kill `cat $pidfile` > /dev/null 2>&1
31 if [ $? -gt 0 ]; then
32 stat_fail
33 exit 1
34 else
35 rm_daemon $daemon_name
36 stat_done
40 restart)
41 $0 stop
42 sleep 3
43 $0 start
47 echo "usage: $0 {start|stop|restart}"
48 esac
49 exit 0