-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://svn.code.sf.net/p/ntlmaps/code/trunk@960 4414eb6b-45f7-0310-abf5-9c8861e1d96f
- Loading branch information
mdomsch
committed
Apr 13, 2009
1 parent
3438932
commit e6f23a4
Showing
3 changed files
with
117 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
#!/bin/sh | ||
# | ||
# ntlmaps - NTLM Authentication Proxy | ||
# | ||
# chkconfig: - 98 10 | ||
# description: Proxy software that allows you \ | ||
# to authenticate via a Microsoft Proxy Server \ | ||
# using the proprietary NTLM protocol. | ||
# | ||
### BEGIN INIT INFO | ||
# Provides: ntlmaps | ||
# Required-Start: $local_fs $network $named | ||
# Required-Stop: $local_fs $network | ||
# Short-Description: start and stop ntlmaps daemon | ||
# Description: Proxy software that allows you to authenticate via a | ||
# Microsoft Proxy Server using the proprietary NTLM | ||
# protocol. | ||
### END INIT INFO | ||
|
||
# Source function library. | ||
. /etc/rc.d/init.d/functions | ||
|
||
exec="/usr/bin/ntlmaps" | ||
prog="ntlmaps" | ||
lockfile=/var/lock/subsys/$prog | ||
|
||
start() { | ||
[ -x $exec ] || exit 5 | ||
echo -n $"Starting $prog: " | ||
daemon $exec > /dev/null 2>&1 & | ||
retval=$? | ||
echo | ||
[ $retval -eq 0 ] && touch $lockfile | ||
return $retval | ||
} | ||
|
||
stop() { | ||
echo -n $"Stopping $prog: " | ||
killproc ${prog} | ||
retval=$? | ||
echo | ||
[ $retval -eq 0 ] && rm -f $lockfile | ||
return $retval | ||
} | ||
|
||
restart() { | ||
stop | ||
start | ||
} | ||
|
||
reload() { | ||
restart | ||
} | ||
|
||
force_reload() { | ||
restart | ||
} | ||
|
||
rh_status() { | ||
# run checks to determine if the service is running or use generic status | ||
status $prog | ||
} | ||
|
||
rh_status_q() { | ||
rh_status >/dev/null 2>&1 | ||
} | ||
|
||
|
||
case "$1" in | ||
start) | ||
rh_status_q && exit 0 | ||
$1 | ||
;; | ||
stop) | ||
rh_status_q || exit 0 | ||
$1 | ||
;; | ||
restart) | ||
$1 | ||
;; | ||
reload) | ||
rh_status_q || exit 7 | ||
$1 | ||
;; | ||
force-reload) | ||
force_reload | ||
;; | ||
status) | ||
rh_status | ||
;; | ||
condrestart|try-restart) | ||
rh_status_q || exit 0 | ||
restart | ||
;; | ||
*) | ||
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" | ||
exit 2 | ||
esac | ||
exit $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,10 @@ Source0: http://downloads.sourceforge.net/ntlmaps/%{name}-%{version}.tar. | |
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) | ||
BuildRequires: python-devel >= 1.5.2, dos2unix | ||
BuildArch: noarch | ||
Requires(post): chkconfig | ||
Requires(preun): chkconfig | ||
# This is for /sbin/service | ||
Requires(preun): initscripts | ||
|
||
%description | ||
NTLM Authorization Proxy Server is a proxy software that allows you to | ||
|
@@ -44,9 +48,20 @@ rm -rf $RPM_BUILD_ROOT | |
%dir %{_sysconfdir}/%{name} | ||
%config(noreplace) %{_sysconfdir}/%{name}/server.cfg | ||
%{_bindir}/%{name}* | ||
%{_sysconfdir}/rc.d/init.d/%{name} | ||
|
||
%post | ||
/sbin/chkconfig --add %{name} | ||
|
||
%preun | ||
if [ $1 = 0 ] ; then | ||
/sbin/service %{name} stop >/dev/null 2>&1 | ||
/sbin/chkconfig --del %{name} | ||
fi | ||
|
||
|
||
%changelog | ||
* Mon Feb 23 2009 Matt Domsch <[email protected]> - 1.0-1 | ||
* Mon Apr 13 2009 Matt Domsch <[email protected]> - 1.0-1 | ||
- minor cleanups. | ||
- finally a 1.0 release! | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters