diff options
Diffstat (limited to 'net-misc/bird/files/initd-bird-2')
-rwxr-xr-x[-rw-r--r--] | net-misc/bird/files/initd-bird-2 | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/net-misc/bird/files/initd-bird-2 b/net-misc/bird/files/initd-bird-2 index 06030d4b3016..3b759df883d8 100644..100755 --- a/net-misc/bird/files/initd-bird-2 +++ b/net-misc/bird/files/initd-bird-2 @@ -1,5 +1,5 @@ #!/sbin/openrc-run -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Copyright 2019 Alarig Le Lay <alarig@grifon.fr> # Distributed under the terms of the GNU General Public License v2 @@ -8,12 +8,20 @@ extra_started_commands="reload" pidfile="/run/${RC_SVCNAME}.pid" command="/usr/sbin/${RC_SVCNAME}" retry=15 +start_stop_daemon_args="--make-pidfile" CONF_FILE="/etc/${RC_SVCNAME}.conf" SOCK="/run/${RC_SVCNAME}.ctl" +if [ ${BIRD_GROUP} ]; then + BIRD_OPTS="${BIRD_OPTS} -g ${BIRD_GROUP}" +fi +if [ ${BIRD_USER} ]; then + BIRD_OPTS="${BIRD_OPTS} -u ${BIRD_USER}" +fi + client_args="-s ${SOCK}" -command_args="${client_args} -c ${CONF_FILE} -P ${pidfile}" +command_args="${client_args} -c ${CONF_FILE} -P ${pidfile} ${BIRD_OPTS}" client_args="${client_args} -r" depend() { @@ -44,6 +52,10 @@ reload() { eend $? } +start_post() { + checkpath -f -m 0655 -o bird:bird "${pidfile}" +} + stop_pre() { if [ "${RC_CMD}" = "restart" ] ; then check_run || return 1 |