1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-18 03:46:03 +00:00
freebsd-ports/databases/firebird25-server/files/firebird.in
Jose Alonso Cardenas Marquez 889c999039 - New port: databases/firebird25-server
Firebird is a relational database offering many ANSI SQL-99 features
that runs on Linux, Windows, and a variety of Unix platforms.  Firebird
offers excellent concurrency, high performance, and powerful language
support for stored procedures and triggers.  It has been used in
production systems, under a variety of names since 1981.

Firebird is completely free of any registration, licensing or deployment
fees.  It may be deployed freely for use with any third-party software,
whether commercial or not.

WWW: http://sourceforge.net/projects/firebird/
WWW: http://www.firebirdsql.org/
2010-12-20 08:48:54 +00:00

63 lines
1.2 KiB
Bash

#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: firebird
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable Firebird Database:
#
# firebird_enable: Set it to "YES" to enable firebird.
# Default is "NO".
# firebird_flags: Set options to run fbguard.
# Default is "-daemon".
# firebird_pidfile: Set full path to pid file.
# Default is "/var/run/firebird.pid".
#
. /etc/rc.subr
name=firebird
rcvar=`set_rcvar`
load_rc_config $name
firebird_enable=${firebird_enable:-"NO"}
firebird_flags=${firebird_flags:-"-daemon"}
firebird_pidfile=${firebird_pidfile:-"/var/run/${name}.pid"}
firebird_user=firebird
command_args="${firebird_flags}"
command=%%PREFIX%%/bin/fbguard
pidfile=${firebird_pidfile}
start_precmd="start_precmd"
start_postcmd="start_postcmd"
stop_postcmd=stop_postcmd
reload_postcmd=reload_postcmd
start_precmd()
{
touch ${firebird_pidfile}
chown "${firebird_user}:wheel" ${firebird_pidfile} ||
err 1 "Cannot chown ${firebird_pidfile}"
}
start_postcmd()
{
pgrep -u ${firebird_user} fbguard > ${firebird_pidfile}
}
stop_postcmd()
{
rm -f ${pidfile}
}
reload_postcmd()
{
rm -f ${pidfile}
run_rc_command start
}
run_rc_command "$1"