X-Git-Url: http://git.pld-linux.org/?p=packages%2FFirebird.git;a=blobdiff_plain;f=firebird.init;h=2702853f7d791b6efe24930a708a2b0ce56646fe;hp=8ab57af2fc3ba0bb5e23c5282cdc7770b045141c;hb=50d0d780546fffffb72fa462d01c6551d40e4806;hpb=9ae190ed8ecca6d2341758289b774de66b06c41d diff --git a/firebird.init b/firebird.init index 8ab57af..2702853 100644 --- a/firebird.init +++ b/firebird.init @@ -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