diff options
Diffstat (limited to 'net-analyzer/honeyd/files/honeyd.initd')
-rw-r--r-- | net-analyzer/honeyd/files/honeyd.initd | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/net-analyzer/honeyd/files/honeyd.initd b/net-analyzer/honeyd/files/honeyd.initd deleted file mode 100644 index 0a6595b05817..000000000000 --- a/net-analyzer/honeyd/files/honeyd.initd +++ /dev/null @@ -1,61 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/honeyd/files/honeyd.initd,v 1.3 2007/01/28 15:02:47 pva Exp $ - -depend() { - need net -} - -start() { - local options - - ebegin "Starting honeyd" - - if [[ -z "${HONEYD_NET}" ]] ; then - eerror "HONEYD_NET variable must be set in /etc/conf.d/honeyd" - eend 1 - return 1 - fi - - # add route - for HNET in ${HONEYD_NET} ; do - if ! netstat -arn | egrep "^${HNET}[[:space:]]*127.0.0.1" ; then - route add -net ${HNET} gw 127.0.0.1 - fi - done - - if [[ -n "${HONEYD_LOG}" ]] ; then - options="${options} -l ${HONEYD_LOG}" - # create logdir if it doesn't exist - [[ ! -d "${HONEYD_LOG%/*}" ]] && mkdir ${HONEYD_LOG%/*} - fi - - # supports webserver feature? - if [[ "$(/usr/sbin/honeyd --help 2>&1 | grep webserver)" != "" ]] ; then - # run webserver? - if [[ ${HONEYD_HTTPD} -eq 1 ]] ; then - options="${options} --webserver-port ${HONEYD_HTTPD_PORT} \ - --webserver-root ${HONEYD_HTTPD_ROOT} --fix-webserver-permissions" - else - options="${options} --disable-webserver" - fi - fi - - options="${options} -i ${HONEYD_IF:-lo} ${HONEYD_OPTS}" - - start-stop-daemon --start --quiet --exec /usr/sbin/honeyd \ - -- ${options} ${HONEYD_NET} >/dev/null 2>&1 - eend $? -} - -stop() { - ebegin "Stopping honeyd" - start-stop-daemon --stop --quiet --retry 5 --exec /usr/sbin/honeyd - retval=$? - for HNET in ${HONEYD_NET} ; do - route del -net ${HNET} gw 127.0.0.1 - done - eend ${retval} -} - |