Bug 127087 - mail/bincimap port does not include an rc.d file
Summary: mail/bincimap port does not include an rc.d file
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-04 13:10 UTC by Nick Hibma
Modified: 2011-02-03 14:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Hibma 2008-09-04 13:10:01 UTC
See below for an rc.d script.

Also, the port should probably depend on sysutils/ucspi-tcp (if tcpserver is
not found) and security/checkpassword-pam (if /usr/local/bin/checkpassword* is
not found).

Fix: 

#!/bin/sh
#
# Copyright 2007, AnyWi Technologies
#
# PROVIDE: bincimapd
# REQUIRE: LOGIN cleanvar
#
# Note: tcpserver can be found in the sysutils/ucspi-tcp package.

. /etc/rc.subr

name="bincimapd"
rcvar=`set_rcvar`

load_rc_config $name

: ${bincimapd_enable="NO"}
: ${bincimapd_tcpserver="/usr/local/bin/tcpserver"}
: ${bincimapd_tcpserver_flags="-R -H"}
: ${bincimapd_host="0"}
: ${bincimapd_port="imap"}
: ${bincimapd_conf="/usr/local/etc/bincimap/bincimap.conf"}
: ${bincimapd_pidfile="/var/run/bincimapd.pid"}
: ${bincimapd_checkpassword="/usr/local/bin/checkpassword-pam"}		# e.g. /usr/local/bin/checkpassword-pam
: ${bincimapd_checksubprogram="/usr/bin/true"}

bincimapd_start()
{
        echo -n "Starting bincimapd: "
	$bincimapd_tcpserver $bincimapd_tcpserver_flags $bincimapd_host $bincimapd_port \
	        /usr/local/bin/bincimap-up --conf=$bincimapd_conf -- \
			/usr/local/bin/checkpassword-pam -s imap -- /usr/local/bin/bincimapd &
	echo $! > $bincimapd_pidfile
	echo "."
}

bincimapd_stop()
{
        echo "Stopping bincimapd"
        pkill -F $bincimapd_pidfile
}

start_cmd="bincimapd_start"
stop_cmd="bincimapd_stop"

run_rc_command "$1"
Comment 1 Stefan Walter freebsd_committer freebsd_triage 2008-10-13 18:41:37 UTC
Hi Nick,

can you provide a patch that can be applied to the current version of the
port including the script you already sent and the changes you mentioned?

Best regards,
Stefan
Comment 2 Nick Hibma 2008-10-13 21:09:15 UTC
Just add the file in the port, add it to pkg-plist, and add the lines

	RUN_DEPENDS += checkpassword-pam:${PORTSDIR}/security/checkpassword-pam
	RUN_DEPENDS += tcpserver:${PORTSDIR}/sysutils/ucspi-tcp

to the Makefile.

I do not have the time to test this unfortunately and I am not that great in 
writing ports anyway.

Nick
Comment 3 Stefan Walter freebsd_committer freebsd_triage 2008-10-17 11:14:25 UTC
State Changed
From-To: open->suspended

Suspended until someone can provide a tested patch.
Comment 4 Tilman Keskinoz freebsd_committer freebsd_triage 2011-02-03 10:26:59 UTC
State Changed
From-To: suspended->open

Suspended is probably the wrong state for this PR. 

A patch can be found at  
http://people.freebsd.org/~arved/stuff/patch-bincimapd.diff 

However, the rc.d script does not work on my system. 
Someone with rc.d-fu should be looking at this
Comment 5 dfilter service freebsd_committer freebsd_triage 2011-02-03 13:59:16 UTC
arved       2011-02-03 13:59:11 UTC

  FreeBSD ports repository

  Modified files:
    mail/bincimap        Makefile 
  Added files:
    mail/bincimap/files  bincimapd.in 
  Log:
  Add missing dependencies and an rc.d file
  
  PR:             127087
  Submitted by:   n_hibma
  Feature safe:   yes
  
  Revision  Changes    Path
  1.17      +5 -0      ports/mail/bincimap/Makefile
  1.1       +41 -0     ports/mail/bincimap/files/bincimapd.in (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Tilman Keskinoz freebsd_committer freebsd_triage 2011-02-03 13:59:19 UTC
State Changed
From-To: open->closed

Committed, thanks.
Comment 7 Tilman Keskinoz freebsd_committer freebsd_triage 2011-02-03 14:00:29 UTC
On 02/03/2011 01:10 PM, Nick Hibma wrote:
> Wat does it not do? Any error? This was the file as it was working on my machine I believe (I've switched to a different IMAP daemon though).
>
> It was created on a FBSD7 machine. I have now FBSD8. If someone wants to commit it and it needs fixing/testing let me know.

Found my mistake, it was just a cutnpaste error.

So i just went ahead and committed it....Thanks.