X-Original-To: alpine-aports@lists.alpinelinux.org Received: from mail-ua0-f182.google.com (mail-ua0-f182.google.com [209.85.217.182]) by lists.alpinelinux.org (Postfix) with ESMTP id C9BDF5C508D for ; Mon, 27 Feb 2017 16:42:23 +0000 (GMT) Received: by mail-ua0-f182.google.com with SMTP id e4so28344664uae.0 for ; Mon, 27 Feb 2017 08:42:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=TMMM1szGGCfXmSHBZ3XFB148NKdKvoc8dtDqV4ANXgc=; b=outzwYX9fv+KtMkdBaPcqzuR8GNWuvBUC43jAvcdxTxhAxp8Kmh5Byw0Q1frllnhEW 61BGLGqk9pTj1UYqv2slL0YV5h72yMgMhD8pnUUgr7n0IaalJIVgM7LAkLXzh6N03rKm nBfvV9NV96HPOIPwnAb0vlNXUozXAkIcKDkfI9edYqFVp4OHXYwcbgANJHFh0WytIBUT pxjRTrzjPsZGAi5MK2FI71Ls1wcnxeoaJq6xMO7K0vecbY6XxopE749IVwADj8YmCbat wx627jXAl4QVbk7wKj+JzckMS1ZG3NQMRN0kLYbJnC0UmHFqkPgxV8j8A3xz9OyTFVqA 1ekA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=TMMM1szGGCfXmSHBZ3XFB148NKdKvoc8dtDqV4ANXgc=; b=AuhGI5ZEYyUF4d764hCit9OZVT4cnx/1o2KKpRvdrvydX+o3t2yVHYS5oBO6cmDlMX niNYfdUp4YCtghDOEEjIv2/SoaNZwCGks4GSuI1WEywc7TE5LIgJKPAU4n1+fkS2O84K aoy57lfTDzmYWCXxn7O5EIJIoQx1Q1Qm66+SJyxc3/5zMzgkehMGotDPchoKwFHa0HdZ 62+oc0d3PzSkDpLITCxro8HqtCYlD+5/gTC21+KdliiMXEtjkARiLYgmG5iW0F6qoEnX kCTYrBlV0V2FO0fD6woeReChknAP+0DvwTuabRzUVApd6H2sAW3RJ7+g4H/bi2MMO8Sk nGig== X-Gm-Message-State: AMke39kfrO06CM6Dnr7UmUXRUkLmhaoTC+ZiCSzHtqmrGHA9Xx/ZMX3BvtHgbm5OmHeMMezEPGqPq9Lu9DtOWQ== X-Received: by 10.31.65.17 with SMTP id o17mr4270625vka.33.1488213743215; Mon, 27 Feb 2017 08:42:23 -0800 (PST) X-Mailinglist: alpine-aports Precedence: list List-Id: Alpine Development List-Unsubscribe: List-Post: List-Help: List-Subscribe: MIME-Version: 1.0 Received: by 10.31.140.138 with HTTP; Mon, 27 Feb 2017 08:42:22 -0800 (PST) Received: by 10.31.140.138 with HTTP; Mon, 27 Feb 2017 08:42:22 -0800 (PST) In-Reply-To: <20170227173932.457b9156@ncopa-desktop.copa.dup.pw> References: <20170227123945.22063-1-valery.kartel@gmail.com> <20170227173932.457b9156@ncopa-desktop.copa.dup.pw> From: Valery Kartel Date: Mon, 27 Feb 2017 18:42:22 +0200 Message-ID: Subject: Re: [alpine-aports] [PATCH v5] testing/rspamd: upgrade to 1.4.4 To: Natanael Copa Cc: alpine-aports Content-Type: multipart/alternative; boundary=001a114db69883a89d054985c394 --001a114db69883a89d054985c394 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable start_pre also calls on restart. But we don't need to check/create pidfile directory in this case. 27 =D1=84=D0=B5=D0=B2=D1=80. 2017 =D0=B3. 18:39 =D0=BF=D0=BE=D0=BB=D1=8C=D0= =B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C "Natanael Copa" =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB: > On Mon, 27 Feb 2017 14:39:45 +0200 > Valery Kartel wrote: > > > --- > > v1 -> v2: add checkconfig command to init script > > > > v2 -> v3: fix checksums > > > > v3 -> v4: remade init-script with checkconfig sub > > > > v4 -> v5: remade init.d and conf.d to use unique RSPAMD_* vars > > remade checkconfig to be a user-called command > > --- > > testing/rspamd/APKBUILD | 22 +++++----------------- > > testing/rspamd/rspamd.confd | 15 ++++++++------- > > testing/rspamd/rspamd.initd | 36 +++++++++++++++++++++++++----------- > > 3 files changed, 38 insertions(+), 35 deletions(-) > > > > diff --git a/testing/rspamd/APKBUILD b/testing/rspamd/APKBUILD > > index 85fc20a1b8..69c35c1707 100644 > > --- a/testing/rspamd/APKBUILD > > +++ b/testing/rspamd/APKBUILD > > @@ -2,8 +2,8 @@ > > # Contributor: Valery Kartel > > # Contributor: Nathan Angelacos > > pkgname=3Drspamd > > -pkgver=3D1.4.3 > > -pkgrel=3D1 > > +pkgver=3D1.4.4 > > +pkgrel=3D0 > > pkgdesc=3D"Fast, free and open-source spam filtering system" > > url=3D"https://rspamd.com" > > arch=3D"x86_64 x86 armhf" > > @@ -106,21 +106,9 @@ utils() { > > mv "$pkgdir"/usr/bin/${pkgname}-redirector "$subpkgdir"/usr/bin > > } > > > > -md5sums=3D"a64e00b906b7f3590e855be50106f99f rspamd-1.4.3.tar.xz > > -c152c6a90f6ae9e5a7a1d137dfbc0305 rspamd.logrotated > > -0656acc12dcce7cba232857a848d0390 rspamd.initd > > -ab12f33ad8e12a7437fb5ea4a9c92eef rspamd.confd > > -ff0bf4f1b1447ca401865369f91418f1 config.patch > > -83f76787389649af63ea921f81cf35b3 cmakelists.patch" > > -sha256sums=3D"144cddc25ce8d8519b289d2c00d34b > 37c931f3c7293e2b0d16c408680021a1bf rspamd-1.4.3.tar.xz > > -6c5e79e9052d957f3d0d634b2ae7a56bbc0901a5d6946dc991c92f19a72fce97 > rspamd.logrotated > > -5bcf68a72e0582859799cd335a14d48914e5291f4087327b3b42562ef64e2958 > rspamd.initd > > -fceba39a20755d48ef3838f7daa92ed9686a118c0a26f06bfe72cc7c15b2e384 > rspamd.confd > > -7e0adb4a2e7e8f806fc5fdae0c37e6948ed56e9d46d4eed0c681806decb90e49 > config.patch > > -d4bc7851bb32b49be98e3964aa9195033b586da27f7f3afa5ce12dfbeadd96b0 > cmakelists.patch" > > -sha512sums=3D"bae86953d881be446f049384cc8bf8 > 451b04619b461a7e2d571407d5af5f2547af8bc9db578e84190e8c55d01f > 9e32ea1d29e998daa2bbb2fac431ed50df27ca rspamd-1.4.3.tar.xz > > +sha512sums=3D"df2260de6585699a5b6692aa210647 > 270b7132372ae6a2437f8532265018fe4db8270a8989ce0c0664cad17cbc > 281ae92f935c4f0974dc2f8da309e54c234b14 rspamd-1.4.4.tar.xz > > 2efe28575c40d1fba84b189bb872860e744400db80dce2f6330be6c6287f > b3f46e6511284729b957488bf40bcb9b0952e26df9934f5f138334bd2766075c45cb > rspamd.logrotated > > -e240983c2fd91d8061b17e35e83a75c56ac2c3625dbe07b83a2e89e3dbf6 > 9b57c675d01772b93968aa6b22d150d54d366f2fb4a0c6551b3cfdedc77d82e28652 > rspamd.initd > > -1320a752cbefe021079b3ed23e312231c39fc600baba7d8440c3e8bdd33e > d673c8831b44a0c76788a8d905469e81088adf26cf245c09b4c2c4fdce7ff4219ee7 > rspamd.confd > > +3ffe0b57a0f62a1d4e6dbc701e68480a91bf161b337e63a8dc25e1b69695 > 1f1510f6f03d1d986875b73ba33db76f86504895b69bcaed7b32b026e6e6e4559df6 > rspamd.initd > > +e417dd825d1b4d03d115db037b2fdf2f48a35420ee7a9010d97167b6c31e > 88d6c0a15dd33b21d7d76856db0fdc5097c922fcdf1d8164d1e92ae377f7c5303947 > rspamd.confd > > 2089429e6f44f8204f31c87c565cdd7abcd51b3146397ba1b2fb23b1be6f > af46fd8ec36718f194a3fc38ac1d38d7be9010a84ac4b49d7e1597706699538c607a > config.patch > > 99593c10ffb04c71a4c83c7522b41f12465a9862283685bbc2fff464fd84 > fcf8b4bc4a892419d31332c01f805c69dd7730f537c60248b92fee35acdc6633a644 > cmakelists.patch" > > diff --git a/testing/rspamd/rspamd.confd b/testing/rspamd/rspamd.confd > > index 9b2cc4b34f..e804b2b642 100644 > > --- a/testing/rspamd/rspamd.confd > > +++ b/testing/rspamd/rspamd.confd > > @@ -1,15 +1,16 @@ > > # User and group to run rspamd workers > > -#user=3Drspamd > > -#group=3Drspamd > > +#RSPAMD_USER=3Drspamd > > +#RSPAMD_GROUP=3Drspamd > > > > -# Main config file > > -#cfgfile=3D/etc/rspamd/rspamd.conf > > +# Main config dir or file > > +#RSPAMD_CONFDIR=3D/etc/rspamd > > +#RSPAMD_CONFIG=3D/etc/rspamd/rspamd.conf > > > > # PID file. Settings from config files are ignored > > -#pidfile=3D/run/rspamd/rspamd.pid > > +#RSPAMD_PIDFILE=3D/run/$RC_SVCNAME/rspamd.pid > > > > # Where to log startup configuration checking > > # - /dev/null - silent (default) > > -# - /dev/tty - show output on curent terminal > > +# - /dev/stdout - show output on curent terminal > > # - /path/filename - append to specified logfile > > -#startuplog=3D/var/log/rspamd/startup.log > > +#RSPAMD_STARTUPLOG=3D/var/log/rspamd/startup.log > > diff --git a/testing/rspamd/rspamd.initd b/testing/rspamd/rspamd.initd > > index 93148ccb4b..0bffd00c26 100644 > > --- a/testing/rspamd/rspamd.initd > > +++ b/testing/rspamd/rspamd.initd > > @@ -1,14 +1,19 @@ > > #!/sbin/openrc-run > > > > description=3D"Rapid spam filtering system" > > -user=3D${user:-rspamd} > > -group=3D${group:-rspamd} > > -cfgfile=3D${cfgfile:-/etc/rspamd/rspamd.conf} > > -pidfile=3D${pidfile:-/run/rspamd/rspamd.pid} > > + > > +: ${user:=3D${RSPAMD_USER:-rspamd}} > > +: ${group:=3D${RSPAMD_GROUP:-rspamd}} > > +: ${cfgdir:=3D${RSPAMD_CONFDIR:-/etc/rspamd}} > > +: ${cfgfile:=3D${RSPAMD_CONFIG:-$cfgdir/rspamd.conf}} > > +: ${pidfile:=3D${RSPAMD_PIDFILE:-/run/$RC_SVCNAME/rspamd.pid}} > > + > > command=3D/usr/sbin/rspamd > > command_args=3D"-u $user -g $group -c $cfgfile -p $pidfile" > > required_files=3D"$cfgfile" > > +extra_commands=3D"checkconfig" > > extra_started_commands=3D"reload reopen" > > +description_checkconfig=3D"Verify configuration" > > description_reload=3D"Reload configuration" > > description_reopen=3D"Reopen log files" > > > > @@ -17,21 +22,30 @@ depend() { > > before mta > > } > > > > +checkconfig() { > > + if [ "$RC_CMD" =3D "checkconfig" ]; then > > + startuplog=3D/dev/stderr > > + ebegin "Checking $RC_SVCNAME config" > > + fi > > + $command $command_args -t >/dev/null 2>>${startuplog:=3D${RSPAMD_ > STARTUPLOG:-/dev/null}} > > + local result=3D$? > > + [ "$RC_CMD" =3D "checkconfig" ] || return $result > > + eend $result > > +} > > I don't like the "$RC_CMD" conditionals. Why can't we do the redirection > in start_pre? > > checkconfig() { > $command $command_args -t > } > > start_pre() { > ... > checkconfig >/dev/null 2>>${startuplog:=3D${RSPAMD_ > STARTUPLOG:-/dev/null}} > } > > > > + > > start_pre() { > > - ebegin > > - checkpath --directory --mode 750 --owner $user:$group ${pidfile%/= *} > > - $command $command_args -t >/dev/null 2>>${startuplog:-/dev/null} > > - eend $? > > + [ "$RC_CMD" =3D "start" ] && checkpath -d -m 750 -o $user:$group > ${pidfile%/*} > > Why do you need to check if RC_CMD is "start"? Will this function ever > run when its not "start"? > > -nc > > > > + checkconfig > > } > > > > reload() { > > - ebegin "Reloading ${SVCNAME}" > > - start-stop-daemon --signal HUP --pidfile $pidfile > > + ebegin "Reloading $RC_SVCNAME config" > > + checkconfig && 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 $? > > } > > --001a114db69883a89d054985c394 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
start_pre also calls on restart. But we don't need to= check/create pidfile directory in this case.

27 =D1=84=D0=B5=D0=B2=D1=80. 2017 =D0=B3.= 18:39 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB= =D1=8C "Natanael Copa" <ncopa@alpinelinux.org> =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB= :
On Mon, 27 Feb 201= 7 14:39:45 +0200
Valery Kartel <valery.kartel@= gmail.com> wrote:

> ---
> v1 -> v2: add checkconfig command to init script
>
> v2 -> v3: fix checksums
>
> v3 -> v4: remade init-script with checkconfig sub
>
> v4 -> v5: remade init.d and conf.d to use unique RSPAMD_* vars
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0remade checkconfig to be a use= r-called command
> ---
>=C2=A0 testing/rspamd/APKBUILD=C2=A0 =C2=A0 =C2=A0| 22 +++++-----------= ------
>=C2=A0 testing/rspamd/rspamd.confd | 15 ++++++++-------
>=C2=A0 testing/rspamd/rspamd.initd | 36 +++++++++++++++++++++++++-----<= wbr>------
>=C2=A0 3 files changed, 38 insertions(+), 35 deletions(-)
>
> diff --git a/testing/rspamd/APKBUILD b/testing/rspamd/APKBUILD
> index 85fc20a1b8..69c35c1707 100644
> --- a/testing/rspamd/APKBUILD
> +++ b/testing/rspamd/APKBUILD
> @@ -2,8 +2,8 @@
>=C2=A0 # Contributor: Valery Kartel <valery.kartel@gmail.com>
>=C2=A0 # Contributor: Nathan Angelacos <nangel@alpinelinux.org>
>=C2=A0 pkgname=3Drspamd
> -pkgver=3D1.4.3
> -pkgrel=3D1
> +pkgver=3D1.4.4
> +pkgrel=3D0
>=C2=A0 pkgdesc=3D"Fast, free and open-source spam filtering system= "
>=C2=A0 url=3D"https://rspamd.com"
>=C2=A0 arch=3D"x86_64 x86 armhf"
> @@ -106,21 +106,9 @@ utils() {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0mv "$pkgdir"/usr/bin/${pkgname}-redirector "$subpkgdir"/usr/bin
>=C2=A0 }
>
> -md5sums=3D"a64e00b906b7f3590e855be50106f99f=C2=A0 rspa= md-1.4.3.tar.xz
> -c152c6a90f6ae9e5a7a1d137dfbc0305=C2=A0 rspamd.logrotated > -0656acc12dcce7cba232857a848d0390=C2=A0 rspamd.initd
> -ab12f33ad8e12a7437fb5ea4a9c92eef=C2=A0 rspamd.confd
> -ff0bf4f1b1447ca401865369f91418f1=C2=A0 config.patch
> -83f76787389649af63ea921f81cf35b3=C2=A0 cmakelists.patch&quo= t;
> -sha256sums=3D"144cddc25ce8d8519b289d2c00d34b37c931f3c7= 293e2b0d16c408680021a1bf=C2=A0 rspamd-1.4.3.tar.xz
> -6c5e79e9052d957f3d0d634b2ae7a56bbc0901a5d6946dc991c92f19a72= fce97=C2=A0 rspamd.logrotated
> -5bcf68a72e0582859799cd335a14d48914e5291f4087327b3b42562ef64= e2958=C2=A0 rspamd.initd
> -fceba39a20755d48ef3838f7daa92ed9686a118c0a26f06bfe72cc7c15b= 2e384=C2=A0 rspamd.confd
> -7e0adb4a2e7e8f806fc5fdae0c37e6948ed56e9d46d4eed0c681806decb= 90e49=C2=A0 config.patch
> -d4bc7851bb32b49be98e3964aa9195033b586da27f7f3afa5ce12dfbead= d96b0=C2=A0 cmakelists.patch"
> -sha512sums=3D"bae86953d881be446f049384cc8bf8451b04619b= 461a7e2d571407d5af5f2547af8bc9db578e84190e8c55d01f9e32ea1d29e998d= aa2bbb2fac431ed50df27ca=C2=A0 rspamd-1.4.3.tar.xz
> +sha512sums=3D"df2260de6585699a5b6692aa210647270b713237= 2ae6a2437f8532265018fe4db8270a8989ce0c0664cad17cbc281ae92f935c4f0= 974dc2f8da309e54c234b14=C2=A0 rspamd-1.4.4.tar.xz
>=C2=A0 2efe28575c40d1fba84b189bb872860e744400db80dce2f6330be6c6287= fb3f46e6511284729b957488bf40bcb9b0952e26df9934f5f138334bd2766075c45cb=C2=A0 rspamd.logrotated
> -e240983c2fd91d8061b17e35e83a75c56ac2c3625dbe07b83a2e89e3dbf= 69b57c675d01772b93968aa6b22d150d54d366f2fb4a0c6551b3cfdedc77d82e28652=C2=A0 rspamd.initd
> -1320a752cbefe021079b3ed23e312231c39fc600baba7d8440c3e8bdd33= ed673c8831b44a0c76788a8d905469e81088adf26cf245c09b4c2c4fdce7ff4219ee7=C2=A0 rspamd.confd
> +3ffe0b57a0f62a1d4e6dbc701e68480a91bf161b337e63a8dc25e1b6969= 51f1510f6f03d1d986875b73ba33db76f86504895b69bcaed7b32b026e6e6e4559df6=C2=A0 rspamd.initd
> +e417dd825d1b4d03d115db037b2fdf2f48a35420ee7a9010d97167b6c31= e88d6c0a15dd33b21d7d76856db0fdc5097c922fcdf1d8164d1e92ae377f7c5303947=C2=A0 rspamd.confd
>=C2=A0 2089429e6f44f8204f31c87c565cdd7abcd51b3146397ba1b2fb23b1be6= faf46fd8ec36718f194a3fc38ac1d38d7be9010a84ac4b49d7e1597706699538c607a=C2=A0 config.patch
>=C2=A0 99593c10ffb04c71a4c83c7522b41f12465a9862283685bbc2fff464fd8= 4fcf8b4bc4a892419d31332c01f805c69dd7730f537c60248b92fee35acdc6633a644=C2=A0 cmakelists.patch"
> diff --git a/testing/rspamd/rspamd.confd b/testing/rspamd/rspamd.confd=
> index 9b2cc4b34f..e804b2b642 100644
> --- a/testing/rspamd/rspamd.confd
> +++ b/testing/rspamd/rspamd.confd
> @@ -1,15 +1,16 @@
>=C2=A0 # User and group to run rspamd workers
> -#user=3Drspamd
> -#group=3Drspamd
> +#RSPAMD_USER=3Drspamd
> +#RSPAMD_GROUP=3Drspamd
>
> -# Main config file
> -#cfgfile=3D/etc/rspamd/rspamd.conf
> +# Main config dir or file
> +#RSPAMD_CONFDIR=3D/etc/rspamd
> +#RSPAMD_CONFIG=3D/etc/rspamd/rspamd.conf
>
>=C2=A0 # PID file. Settings from config files are ignored
> -#pidfile=3D/run/rspamd/rspamd.pid
> +#RSPAMD_PIDFILE=3D/run/$RC_SVCNAME/rspamd.pid
>
>=C2=A0 # Where to log startup configuration checking
>=C2=A0 # - /dev/null - silent (default)
> -# - /dev/tty - show output on curent terminal
> +# - /dev/stdout - show output on curent terminal
>=C2=A0 # - /path/filename - append to specified logfile
> -#startuplog=3D/var/log/rspamd/startup.log
> +#RSPAMD_STARTUPLOG=3D/var/log/rspamd/startup.log
> diff --git a/testing/rspamd/rspamd.initd b/testing/rspamd/rspamd.initd=
> index 93148ccb4b..0bffd00c26 100644
> --- a/testing/rspamd/rspamd.initd
> +++ b/testing/rspamd/rspamd.initd
> @@ -1,14 +1,19 @@
>=C2=A0 #!/sbin/openrc-run
>
>=C2=A0 description=3D"Rapid spam filtering system"
> -user=3D${user:-rspamd}
> -group=3D${group:-rspamd}
> -cfgfile=3D${cfgfile:-/etc/rspamd/rspamd.conf}
> -pidfile=3D${pidfile:-/run/rspamd/rspamd.pid}
> +
> +: ${user:=3D${RSPAMD_USER:-rspamd}}
> +: ${group:=3D${RSPAMD_GROUP:-rspamd}}
> +: ${cfgdir:=3D${RSPAMD_CONFDIR:-/etc/rspamd}}
> +: ${cfgfile:=3D${RSPAMD_CONFIG:-$cfgdir/rspamd.conf}}
> +: ${pidfile:=3D${RSPAMD_PIDFILE:-/run/$RC_SVCNAME/rspamd.pid}} > +
>=C2=A0 command=3D/usr/sbin/rspamd
>=C2=A0 command_args=3D"-u $user -g $group -c $cfgfile -p $pidfile&= quot;
>=C2=A0 required_files=3D"$cfgfile"
> +extra_commands=3D"checkconfig"
>=C2=A0 extra_started_commands=3D"reload reopen"
> +description_checkconfig=3D"Verify configuration"
>=C2=A0 description_reload=3D"Reload configuration"
>=C2=A0 description_reopen=3D"Reopen log files"
>
> @@ -17,21 +22,30 @@ depend() {
>=C2=A0 =C2=A0 =C2=A0 =C2=A0before mta
>=C2=A0 }
>
> +checkconfig() {
> +=C2=A0 =C2=A0 =C2=A0if [ "$RC_CMD" =3D "checkconfig&qu= ot; ]; then
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0startuplog=3D/dev/std= err
> +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0ebegin "Checking= $RC_SVCNAME config"
> +=C2=A0 =C2=A0 =C2=A0fi
> +=C2=A0 =C2=A0 =C2=A0$command $command_args -t >/dev/null 2>>= ${startuplog:=3D${RSPAMD_STARTUPLOG:-/dev/null}}
> +=C2=A0 =C2=A0 =C2=A0local result=3D$?
> +=C2=A0 =C2=A0 =C2=A0[ "$RC_CMD" =3D "checkconfig"= ] || return $result
> +=C2=A0 =C2=A0 =C2=A0eend $result
> +}

I don't like the "$RC_CMD" conditionals. Why can't we do = the redirection in start_pre?

checkconfig() {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 $command $command_args -t
}

start_pre() {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 ...
=C2=A0 =C2=A0 =C2=A0 =C2=A0 checkconfig >/dev/null 2>>${startuplog= :=3D${RSPAMD_STARTUPLOG:-/dev/null}}
}


> +
>=C2=A0 start_pre() {
> -=C2=A0 =C2=A0 =C2=A0ebegin
> -=C2=A0 =C2=A0 =C2=A0checkpath --directory --mode 750 --owner $user:$g= roup ${pidfile%/*}
> -=C2=A0 =C2=A0 =C2=A0$command $command_args -t >/dev/null 2>>= ${startuplog:-/dev/null}
> -=C2=A0 =C2=A0 =C2=A0eend $?
> +=C2=A0 =C2=A0 =C2=A0[ "$RC_CMD" =3D "start" ] &am= p;& checkpath -d -m 750 -o $user:$group ${pidfile%/*}

Why do you need to check if RC_CMD is "start"? Will this function= ever
run when its not "start"?

-nc


> +=C2=A0 =C2=A0 =C2=A0checkconfig
>=C2=A0 }
>
>=C2=A0 reload() {
> -=C2=A0 =C2=A0 =C2=A0ebegin "Reloading ${SVCNAME}"
> -=C2=A0 =C2=A0 =C2=A0start-stop-daemon --signal HUP --pidfile $pidfile=
> +=C2=A0 =C2=A0 =C2=A0ebegin "Reloading $RC_SVCNAME config" > +=C2=A0 =C2=A0 =C2=A0checkconfig && start-stop-daemon --signal= HUP --pidfile $pidfile
>=C2=A0 =C2=A0 =C2=A0 =C2=A0eend $?
>=C2=A0 }
>
>=C2=A0 reopen() {
> -=C2=A0 =C2=A0 =C2=A0ebegin "Reopening ${SVCNAME} log files"=
> +=C2=A0 =C2=A0 =C2=A0ebegin "Reopening $RC_SVCNAME log files"= ;
>=C2=A0 =C2=A0 =C2=A0 =C2=A0start-stop-daemon --signal USR1 --pidfile $p= idfile
>=C2=A0 =C2=A0 =C2=A0 =C2=A0eend $?
>=C2=A0 }

--001a114db69883a89d054985c394-- --- Unsubscribe: alpine-aports+unsubscribe@lists.alpinelinux.org Help: alpine-aports+help@lists.alpinelinux.org ---