Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37048337
en ru br
Репозитории ALT
S:4.0.0.2496.0-alt4
5.1: 2.1.3.18185.0-alt3.M51.4
4.1: 2.1.1.17910.0-alt0.M41.5
4.0: 2.1.1.17910.0-alt3.M40.4
+backports:2.1.1.17910.0-alt3.M40.1
www.altlinux.org/Changes

Группа :: Базы Данных
Пакет: firebird

 Главная   Изменения   Спек   Патчи   Исходники   Загрузить   Gear   Bugs and FR  Repocop 

#!/bin/sh
#!/bin/bash
# firebird This is the init script for starting up the Firebird
# server
#
# chkconfig: - 64 36
# description: Starts and stops the default instance of Firebird
# processname: fbmgr
# pidfile: /var/run/firebird/default.pid
# description: Start/Stop firebird database server

# To run more instances of firebird:
# Copy /usr/lib/firebird somewhere
# Copy this script under a new name
# Change INSTANCE and FIREBIRD below (all instance names should be unique)
# Edit the copied firebird.conf to change at least RemoteServicePort

WITHOUT_RC_COMPAT=1

# Source function library.
. /etc/init.d/functions

INSTANCE=default

# No changes needed below for multiple instances
USER=firebird
PIDFILE=/var/run/firebird/$INSTANCE.pid
FULLNAME="Firebird server [$INSTANCE]"
EXE=/usr/bin/fbmgr
RETVAL=0
LOCKFILE=/var/lock/subsys/firebird

start()
{
if start-stop-daemon --start --test --quiet --pidfile "$PIDFILE" \
--user $USER --exec "$EXE" >/dev/null; then
action "Starting Firebird:" \
start-stop-daemon --start --pidfile "$PIDFILE" --chuid $USER --exec "$EXE" \
-- "-pidfile $PIDFILE -start"
else
msg_already_running Firebird
passed "Firebird startup"
echo
fi
RETVAL=$?
[ "$RETVAL" -ne 0 ] || touch "$LOCKFILE"
return $RETVAL
}

stop()
{
action "Stopping Firebird:" \
start-stop-daemon --stop --pidfile "$PIDFILE" --user $USER
RETVAL=$?
[ "$RETVAL" -ne 0 ] || rm -f -- "$LOCKFILE"
return $RETVAL
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
status)
if [ -f $PIDFILE ]
then
pid=`cat $PIDFILE`
ps -p $pid >/dev/null 2>&1
RETVAL=$?
else
RETVAL=1
fi
if [ $RETVAL -eq 0 ]
then
echo "$FULLNAME is running, pid $pid"
else
echo "$FULLNAME is stopped."
fi
;;
restart|reload)
$0 stop
sleep 1
$0 start
RETVAL=$?
;;
condrestart|condreload)
if [ -e "$LOCKFILE" ]; then
$0 restart
fi
;;
condstop)
if [ -e "$LOCKFILE" ]; then
$0 stop
fi
;;
*)
echo "Usage: firebird {start|stop|status|restart|reload|condrestart|condreload|condstop}"
exit 1
esac

exit $RETVAL

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin