summaryrefslogtreecommitdiff
path: root/databases/firebird30-server/files/firebird.in
diff options
context:
space:
mode:
authorJose Alonso Cardenas Marquez <acm@FreeBSD.org>2021-06-27 20:11:43 -0500
committerJose Alonso Cardenas Marquez <acm@FreeBSD.org>2021-06-27 20:14:20 -0500
commitca43515803a2c11ec91ed6f32aa3155628e45ae8 (patch)
tree3c4ebd8d0470b0d3b1756cb193b97ff330b369d2 /databases/firebird30-server/files/firebird.in
parentbiology/biostar-tools: Remove falsehood in pkg-message (diff)
databases/fireird30-[client|server]: New port: Firebird-3 relational database
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: https://sourceforge.net/projects/firebird/ WWW: http://www.firebirdsql.org/ PR: 254387
Diffstat (limited to 'databases/firebird30-server/files/firebird.in')
-rw-r--r--databases/firebird30-server/files/firebird.in61
1 files changed, 61 insertions, 0 deletions
diff --git a/databases/firebird30-server/files/firebird.in b/databases/firebird30-server/files/firebird.in
new file mode 100644
index 000000000000..f054b2659400
--- /dev/null
+++ b/databases/firebird30-server/files/firebird.in
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+# 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 firebird.
+# Default is "-el /var/db/firebird".
+# firebird_pidfile: Set full path to pid file.
+# Default is "/var/run/firebird.pid".
+#
+
+. /etc/rc.subr
+
+name=firebird
+rcvar=firebird_enable
+
+load_rc_config $name
+
+firebird_enable=${firebird_enable:-"NO"}
+firebird_flags=${firebird_flags:-"-el /var/db/firebird"}
+firebird_pidfile=${firebird_pidfile:-"/var/run/${name}.pid"}
+firebird_user=firebird
+
+command=%%PREFIX%%/sbin/firebird
+command_args="${firebird_flags} &"
+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} ${name} > ${firebird_pidfile}
+}
+
+stop_postcmd()
+{
+ rm -f ${pidfile}
+}
+
+reload_postcmd()
+{
+ rm -f ${pidfile}
+ run_rc_command start
+}
+
+run_rc_command "$1"