[BACK]Return to cntlm.sh CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / net / cntlm / files

File: [cvs.NetBSD.org] / pkgsrc / net / cntlm / files / cntlm.sh (download)

Revision 1.1.1.1 (vendor branch), Fri Oct 30 19:55:30 2009 UTC (10 years, 9 months ago) by jym
Branch: TNF, MAIN
CVS Tags: pkgsrc-base, pkgsrc-2020Q2-base, pkgsrc-2020Q2, pkgsrc-2020Q1-base, pkgsrc-2020Q1, pkgsrc-2019Q4-base, pkgsrc-2019Q4, pkgsrc-2019Q3-base, pkgsrc-2019Q3, pkgsrc-2019Q2-base, pkgsrc-2019Q2, pkgsrc-2019Q1-base, pkgsrc-2019Q1, pkgsrc-2018Q4-base, pkgsrc-2018Q4, pkgsrc-2018Q3-base, pkgsrc-2018Q3, pkgsrc-2018Q2-base, pkgsrc-2018Q2, pkgsrc-2018Q1-base, pkgsrc-2018Q1, pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1, pkgsrc-2015Q4-base, pkgsrc-2015Q4, pkgsrc-2015Q3-base, pkgsrc-2015Q3, pkgsrc-2015Q2-base, pkgsrc-2015Q2, pkgsrc-2015Q1-base, pkgsrc-2015Q1, pkgsrc-2014Q4-base, pkgsrc-2014Q4, pkgsrc-2014Q3-base, pkgsrc-2014Q3, pkgsrc-2014Q2-base, pkgsrc-2014Q2, pkgsrc-2014Q1-base, pkgsrc-2014Q1, pkgsrc-2013Q4-base, pkgsrc-2013Q4, pkgsrc-2013Q3-base, pkgsrc-2013Q3, pkgsrc-2013Q2-base, pkgsrc-2013Q2, pkgsrc-2013Q1-base, pkgsrc-2013Q1, pkgsrc-2012Q4-base, pkgsrc-2012Q4, pkgsrc-2012Q3-base, pkgsrc-2012Q3, pkgsrc-2012Q2-base, pkgsrc-2012Q2, pkgsrc-2012Q1-base, pkgsrc-2012Q1, pkgsrc-2011Q4-base, pkgsrc-2011Q4, pkgsrc-2011Q3-base, pkgsrc-2011Q3, pkgsrc-2011Q2-base, pkgsrc-2011Q2, pkgsrc-2011Q1-base, pkgsrc-2011Q1, pkgsrc-2010Q4-base, pkgsrc-2010Q4, pkgsrc-2010Q3-base, pkgsrc-2010Q3, pkgsrc-2010Q2-base, pkgsrc-2010Q2, pkgsrc-2010Q1-base, pkgsrc-2010Q1, pkgsrc-2009Q4-base, pkgsrc-2009Q4, HEAD
Changes since 1.1: +0 -0 lines

Initial import of cntlm 0.35.1 into the NetBSD package system.

Cntlm is an NTLM/NTLMv2 authenticating HTTP proxy. It takes the address of your
proxy or proxies (host1..N and port1..N) and opens a listening socket,
forwarding each request to the parent proxy (moving in a circular list if the
active parent stops working). Along the way, a connection to the parent is
created anew and authenticated or, if available, previously cached connection
is reused to achieve higher efficiency and faster responses. When the chain is
set up, cntlm should be used as a proxy in your applications. Cntlm also
integrates transparent TCP/IP port forwarding (tunneling) through the parent
(incl. authentication).

It can be used against most ISA servers, and helps to provide ease of
integration for programs not supporting NTLM authentication directly, via
cntlm's builtin SOCKS5 proxy.


#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: cntlm.sh,v 1.1.1.1 2009/10/30 19:55:30 jym Exp $
#
# PROVIDE: cntlm
# REQUIRE: DAEMON
#
# You will need to set some variables in /etc/rc.conf to start cntlm:
#
# cntlm=YES
#
# The following variables are optional:
#
# cntlm_flags="" # Additional flags to pass to cntlm
#
# "cntlm_flags" contains options for the cntlm daemon. See cntlm(1) for
# possible options.

if [ -f /etc/rc.subr ]; then
	. /etc/rc.subr
fi

name="cntlm"
rcvar=${name}

cntlm_config="@PKG_SYSCONFDIR@/${name}.conf"
cntlm_user="@CNTLM_USER@"
pidfile="@VARBASE@/run/${name}.pid"

command="@PREFIX@/bin/${name}"
command_args="-U $cntlm_user -P $pidfile -c $cntlm_config "
required_files="$cntlm_config"

start_precmd="cntlm_prestartcmd"
stop_postcmd="cntlm_poststopcmd"

cntlm_prestartcmd() {
	touch $pidfile
	chown $cntlm_user $pidfile
}

cntlm_poststopcmd() {
	if [ -f $pidfile ]; then
		rm -f $pidfile
	fi
}

if [ -f /etc/rc.subr ]; then
	load_rc_config $name
	run_rc_command "$1"
else
	@ECHO@ -n ' ${name}'
	${command} ${cntlm_flags} ${command_args}
fi