Mail archive
alpine-aports

Re: [alpine-aports] [PATCH] testing/rspamd: upgrade to 1.4.4

From: Natanael Copa <ncopa_at_alpinelinux.org>
Date: Fri, 24 Feb 2017 16:48:39 +0100

On Fri, 24 Feb 2017 16:37:18 +0200
Valery Kartel <valery.kartel_at_gmail.com> wrote:

> fixes in init script
> ---
> testing/rspamd/APKBUILD | 18 +++---------------
> testing/rspamd/rspamd.initd | 10 ++++------
> 2 files changed, 7 insertions(+), 21 deletions(-)
>

...

> diff --git a/testing/rspamd/rspamd.initd b/testing/rspamd/rspamd.initd
> index 93148ccb4b..b0eb9b057a 100644
> --- a/testing/rspamd/rspamd.initd
> +++ b/testing/rspamd/rspamd.initd
> _at_@ -18,20 +18,18 @@ depend() {
> }
>
> start_pre() {
> - ebegin
> - checkpath --directory --mode 750 --owner $user:$group ${pidfile%/*}
> + [ "$RC_CMD" = "start" ] && checkpath -d -m 750 -o $user:$group ${pidfile%/*}
> $command $command_args -t >/dev/null 2>>${startuplog:-/dev/null}
> - eend $?
> }
>
> reload() {
> - ebegin "Reloading ${SVCNAME}"
> - start-stop-daemon --signal HUP --pidfile $pidfile
> + ebegin "Reloading $RC_SVCNAME config"
> + start_pre && start-stop-daemon --signal HUP --pidfile $pidfile
> eend $?
> }
>
> reopen() {
> - ebegin "Reopening ${SVCNAME} log files"
> + ebegin "Reopening $RC_SVCNAME log files"
> start-stop-daemon --signal USR1 --pidfile $pidfile
> eend $?
> }


I would have prefered:

checkconfig() {
        $command $command_args -t >/dev/null 2>>${startuplog:-/dev/null}
}

start_pre() {
        checkpath --directory --mode 750 --owner $user:$group ${pidfile%/*}
        checkconfig
}

reload() {
        ebegin "Reloading $RC_SVCNAME config"
        checkconfig && start-stop-daemon --signal HUP --pidfile $pidfile
        eend $?
}

-nc


---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Fri Feb 24 2017 - 16:48:39 GMT