head	1.4;
access;
symbols
	RELEASE_6_1_0:1.3
	RELEASE_5_5_0:1.3
	RELEASE_6_0_0:1.2
	RELEASE_5_4_0:1.1
	RELEASE_4_11_0:1.1;
locks; strict;
comment	@# @;


1.4
date	2006.09.02.21.52.20;	author kris;	state dead;
branches;
next	1.3;

1.3
date	2005.12.20.14.26.11;	author marius;	state Exp;
branches;
next	1.2;

1.2
date	2005.07.10.15.04.00;	author marius;	state Exp;
branches;
next	1.1;

1.1
date	2004.12.11.21.28.36;	author marius;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Remove expired ports.
@
text
@--- script/avupdater.orig	Nov 25 10:29:31 2004
+++ script/avupdater	Wed Dec  8 15:23:09 2004
@@@@ -5,13 +5,11 @@@@
 # Copyright 2002-2005 H+BEDV Datentechnik GmbH
 #
 
-PATH="/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin"
-
 DAEMONNAME="antivir"
-AVDIR="/usr/lib/AntiVir"
+AVDIR="%%PREFIX%%/AntiVir"
 
 DAEMON="${AVDIR}/${DAEMONNAME}"
-DAEMONPARAMS="--updater-daemon"
+DAEMONPARAMS="--updater-daemon -q -C %%PREFIX%%/etc/antivir.conf"
 SERVICENAME="avupdater"
 OS=`uname | tr "[:upper:]" "[:lower:]"`
 PROCCMD=""
@@@@ -35,23 +33,22 @@@@
 {
 	if [ $1 -eq 0 ]
 	then
-		${ECHO} "."
+		${ECHO} -n " ${SERVICENAME}"
 	fi
 	exit $1
 }
 
 stopEXIT()
 {
-	if [ $1 -ne 1 ]
+	if [ $1 -eq 0 ]
 	then
-		${ECHO} "."
+		${ECHO} -n " ${SERVICENAME}"
 	fi
 	exit $1
 }
 
 statusEXIT()
 {
-	${ECHO} "."
 	exit $1
 }
 
@@@@ -104,7 +101,7 @@@@
 		fi
 	fi
 
-	for PROC in `$PROCCMD | grep ${DAEMONNAME}.*${DAEMONPARAMS} | grep -v grep`
+	for PROC in `$PROCCMD | grep "${DAEMONNAME}.*${DAEMONPARAMS}" | grep -v grep`
 	do
 		if [ -z "`$ECHO ${PROC} | sed -e s/[0-9]//g`" ]
 		then
@@@@ -115,16 +112,9 @@@@
 
 case "$1" in
 	start)
-		${ECHO} -n "Starting AntiVir: ${SERVICENAME}"
-
 		if [ ! -x "${DAEMON}" ]
 		then
 			# daemon missing
-
-			${ECHO} " (FAILED)"
-			${ECHO} " "
-			${ECHO} "error: ${DAEMON} missing"
-			${ECHO} " "
 			startEXIT 5
 		fi
 
@@@@ -144,20 +134,12 @@@@
 		if [ ${ERROR} -ne 0 -o -z "${PROCESSLIST}" ]
 		then
 			# daemon failed to start, there is a problem
-
-			${ECHO} " (FAILED)"
-			${ECHO} " "
-			${ECHO} "error: ${DAEMON} failed"
-			${ECHO} "See log files for details."
-			${ECHO} " "
 			startEXIT 1
 		fi
 
 		startEXIT 0
 		;;
 	stop)
-		${ECHO} -n "Stopping AntiVir: ${SERVICENAME}"
-
 		getPROCESSLIST
 		if [ -z "${PROCESSLIST}" ]
 		then
@@@@ -194,28 +176,21 @@@@
 		if [ ! -z "${PROCESSLIST}" ]
 		then
 			# there are still processes running? this may be a problem
-
-			${ECHO} " (FAILED)"
-			${ECHO} " "
-			${ECHO} "There may be processes still running."
-			${ECHO} " "
 			stopEXIT 1
 		fi
 
 		stopEXIT 0
 		;;
 	status)
-		${ECHO} -n "AntiVir Status: ${SERVICENAME} "
-
 		getPROCESSLIST
 
 		# display the results of what we found
 		if [ -z "${PROCESSLIST}" ]
 		then
-			${ECHO} -n "not running"
+			${ECHO} "FAILED ${SERVICENAME} not running"
 			statusEXIT 3
 		else
-			${ECHO} -n "running"
+			${ECHO} "OK ${SERVICENAME} running"
 			statusEXIT 0
 		fi
 		;;
@


1.3
log
@- Update to 1.1.2-1 in order to fix fetching. [1]
  According to the changelog beside a OpenBSD-specific fix the only relevant
  change since 1.1.1-9 was:
  o The log file (syslog too) shows the file name (argv[0]) in its logs.

- No longer override FETCH_CMD so the distfiles survey keeps track of this
  port again. Overriding FETCH_CMD became redundant when the name of the
  distfile was changed to be a versioned one.

Prodded by:	stephen <vk3heg@@iinet.net.au> [1]
Approved by:	netchild
@
text
@@


1.2
log
@- Update to 1.1.0-7 in order to fix fetching. For a list of changes see
  the installed ChangeLog.
- Silencing the 'cannot access config file "/etc/antivir.conf"' warnings
  by creating a respective symlink.

Notes:
- AntiVir Milter 1.1.0-7 ships with a faulty anti-virus engine which
  may just exit with the following error when trying to start it:
  cannot access config file "/etc/avguard.conf"
  Please update to the latest anti-virus engine by e.g. running the
  antivirupdater script in order to solve this.
- The future of the free licenses for private use and thus of this
  port currently is uncertain:
  <...>
  PersonalEdition Classic UNIX: Advance Notice
  We have decided to orient the version 6.32 which will be released on
  September 6, 2005 much more towards the successful PersonalEdition
  Classic Windows.
  This means that version 6.32 will be released with a graphical user
  interface which will make it much easier to work with the program. It
  will also no longer be necessary to register for the program before
  downloading it. With version 6.32 the PersonalEdition Classic UNIX
  will no longer contain any MailGate/Milter functionality.
  <...>

Approved by:	netchild
@
text
@d3 2
a4 2
@@@@ -5,10 +5,8 @@@@
 # Copyright (c) 2002-2005 H+BEDV Datentechnik GmbH
d13 15
a27 1
 DAEMON="$AVDIR/$DAEMONNAME"
d29 27
a55 1
@@@@ -71,63 +69,41 @@@@
d59 1
a59 1
-		$ECHO -n "Starting AntiVir: avupdater"
d61 9
a69 25
-		if [ ! -x "$DAEMON" ]
-		then
-			$ECHO " (FAILED)"
-			$ECHO " "
-			$ECHO "error: $DAEMON is missing"
-			$ECHO " "
-			exit 1
-		fi
-
-		$DAEMON --updater-daemon -q
-
-		if [ $? -ne 0 ]
-		then
-			$ECHO " (FAILED)"
-			$ECHO " "
-			$ECHO "error: $DAEMONNAME failed to start"
-			$ECHO "See log files for details."
-			$ECHO " "
-			exit 1
+		if [ -x "$DAEMON" ]; then
+			$DAEMON --updater-daemon -q \
+				-C %%PREFIX%%/etc/antivir.conf
+			if [ $? -eq 0 ]; then
+				$ECHO -n " avupdater"
+			fi
d71 5
d77 9
a85 1
-		$ECHO "."
d88 1
a88 1
-		$ECHO -n "Stopping AntiVir: avupdater"
d91 13
a103 4
 		for PROC in $PROCESSLIST
 		do
 			kill -TERM $PROC > /dev/null 2>&1
 		done
d105 1
a105 6
-		$ECHO "."
+		$ECHO -n " avupdater"
 		;;
 	restart)
 		$0 stop
 		$0 start
d108 1
a108 1
-		$ECHO -n "AntiVir Status: avupdater "
d111 3
a113 1
 		if [ ! -z "$PROCESSLIST" ]
d115 3
a117 3
-			$ECHO -n "(running)"
+			$ECHO "OK avupdater is running!"
 			RC=0
d119 3
a121 3
-			$ECHO -n "(not running)"
+			$ECHO "FAILED avupdater is not running!"
 			RC=3
a122 7
-		$ECHO "."
 		exit $RC
 		;;
 	*)
-		$ECHO "usage: $0 {start|stop|restart|status}"
+		$ECHO "Usage: `basename $0` {start|stop|restart|status}" >&2
 		exit 1
a123 1
 esac
@


1.1
log
@Update to 1.1.0-3 which amongst several fixes and some minor new features
brings native binaries for FreeBSD/i386 5-STABLE. For a complete list of
changes since 1.1 please see the installed ChangeLog.

Approved by:	netchild
@
text
@d1 1
a1 1
--- script/avupdater.orig	Thu Nov 25 10:29:31 2004
d4 1
a4 1
 # Copyright (c) 2002-2004 H+BEDV Datentechnik GmbH
d15 1
a15 19
@@@@ -41,6 +39,17 @@@@
 	PROCESSLIST=""
 
 	case "${OS}" in
+		freebsd)
+			# Work around bug in some versions of ps(1) where
+			# `ps -o 'pid= command='` doesn't work.
+			for PROC in `ps axw -o 'pid=' -o 'command=' | grep ${DAEMONNAME}.*[-]-updater-daemon`
+			do
+				if [ -z "`$ECHO ${PROC} | sed -e s/[0-9]//g`" ]
+				then
+					PROCESSLIST="${PROCESSLIST} ${PROC}"
+				fi
+			done
+			;;
 		sunos)
 			for PROC in `ps -Ao pid,args | grep ${DAEMONNAME}.*[-]-updater-daemon`
 			do
@@@@ -64,63 +73,41 @@@@
d56 1
a56 1
 			kill -15 $PROC
@

