summaryrefslogtreecommitdiff
path: root/dev-db/firebird/files/firebird.init.d.3.0
blob: 9fd4f8504769cb80ea0f0da9b96dc33267e0a4d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/sbin/openrc-run
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License, v2 or later

name=${RC_SVCNAME}

fbhomedir="/var/run/firebird"
fblogdir="/var/log/firebird"
pidfile="${fbhomedir}/firebird.pid"
command="/usr/sbin/fbguard"
command_args="-forever -daemon -pidfile $pidfile"

start_stop_daemon_args="-p ${pidfile} -u ${FBUSER:-firebird}:${FBGROUP:-firebird}"

depend() {
	need net
}

start_pre() {
	checkpath -q -d -m 0770 -o ${FBUSER:-firebird}:${FBGROUP:-firebird} ${fbhomedir} || return 1
	checkpath -q -d -m 0770 -o ${FBUSER:-firebird}:${FBGROUP:-firebird} ${fblogdir} || return 1
}