Mail archive
alpine-devel

Re: [alpine-devel] new aport clamsmtp

From: Natanael Copa <natanael.copa_at_gmail.com>
Date: Tue, 03 Feb 2009 15:18:06 +0100

On Tue, 2009-02-03 at 11:44 +0000, Carlo Landmeter wrote:
> From f1ce4e56e76edddbe583d01ad0289aba952f73ca Mon Sep 17 00:00:00 2001
> From: Carlo Landmeter <clandmeter_at_gmail.com>
> Date: Tue, 3 Feb 2009 11:42:48 +0000
> Subject: [PATCH] extra/clamstmp: new aport

maybe add pkg desc and url in the commit message for new aports in
future?

it is handy when looking at the commit logs

> ---
> diff --git a/extra/clamsmtp/clamsmtp.confd
> b/extra/clamsmtp/clamsmtp.confd
> new file mode 100644
> index 0000000..a2c9cf5
> --- /dev/null
> +++ b/extra/clamsmtp/clamsmtp.confd
> _at_@ -0,0 +1,5 @@
> +#
> +# Specify daemon $OPTS here.
> +#
> +
> +OPTS="-p /var/run/clamsmtpd.pid"

I dont think the pidfile shoudl be a configuration option since its set
hard in the init.d script...

> diff --git a/extra/clamsmtp/clamsmtp.initd
> b/extra/clamsmtp/clamsmtp.initd
> new file mode 100644
> index 0000000..4ccfe6c
> --- /dev/null
> +++ b/extra/clamsmtp/clamsmtp.initd
> _at_@ -0,0 +1,25 @@
> +#!/sbin/runscript
> +
> +# Sample init.d file for alpine linux.
> +
> +NAME=clamsmtpd
> +DAEMON=/usr/sbin/$NAME
> +
> +depend() {
> + need net clamd
> +}
> +
> +start() {
> + ebegin "Starting ${NAME}"
> + start-stop-daemon --start --quiet \
> + --exec ${DAEMON} -- ${OPTS}

...so we should set the pidfile hard here too and not in the conf.d:

                   --exec ${DAEMON} -- ${OPTS} -p /var/run/$NAME.pid

> + eend $?
> +}
> +
> +stop() {
> + ebegin "Stopping ${NAME}"
> + start-stop-daemon --stop --quiet \
> + --exec ${DAEMON} \
> + --pidfile /var/run/${NAME}.pid
> + eend $?
> +}
> --
> 1.6.1


I committed it anyway.

Thanks!

-nc



---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Tue Feb 03 2009 - 15:18:06 UTC