]> git.pld-linux.org Git - packages/Firebird.git/blobdiff - firebird.init
- release 2 (by relup.sh)
[packages/Firebird.git] / firebird.init
index 8ab57af2fc3ba0bb5e23c5282cdc7770b045141c..2702853f7d791b6efe24930a708a2b0ce56646fe 100644 (file)
@@ -17,7 +17,7 @@ if [ -f /etc/sysconfig/firebird ]; then
        . /etc/sysconfig/firebird
 fi
 
-DAEMON=/usr/lib/interbase/bin/fbmgr
+DAEMON=/usr/lib/interbase/bin/fbmgr.bin
 
 # Check that networking is up.
 if is_yes "${NETWORKING}"; then
@@ -29,11 +29,7 @@ else
        exit 0
 fi
 
-RETVAL=0
-# See how we were called.
-case "$1" in
-  start)
-       # Start daemons.
+start() {
        if [ ! -f /var/lock/subsys/firebird ]; then
                msg_starting firebird
                daemon --user firebird $DAEMON -start -forever
@@ -42,9 +38,9 @@ case "$1" in
        else
                msg_already_running firebird
        fi
-       ;;
-  stop)
-       # Stop daemons.
+}
+
+stop() {
        if [ -f /var/lock/subsys/firebird ]; then
                msg_stopping firebird
                daemon --user firebird $DAEMON -shut
@@ -52,18 +48,43 @@ case "$1" in
        else
                msg_not_running firebird
        fi
+}
+
+condrestart() {
+       if [ -f /var/lock/subsys/firebird ]; then
+               stop
+               start
+       else
+               msg_not_running firebird
+               RETVAL=$1
+       fi
+}
+
+RETVAL=0
+# See how we were called.
+case "$1" in
+  start)
+       start
        ;;
-  restart|force-reload)
-       $0 stop
-       $0 start
-       exit $?
+  stop)
+       stop
+       ;;
+  restart)
+       stop
+       start
+       ;;
+  try-restart)
+       condrestart 0
+       ;;
+  force-reload)
+       condrestart 7
        ;;
   status)
        status fb_inet_server
        exit $?
        ;;
   *)
-       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       msg_usage "$0 {start|stop|restart|try-restart|force-reload|status}"
        exit 3
 esac
 
This page took 0.029323 seconds and 4 git commands to generate.