Package: ftpsync Version: 20170204 Severity: normal Tag: patch the notification for "Update for ftpsync available" is not working because the script logic is wrong. The test for a new version itself is working, but the second test only infor every third day never triggers, because the initial value of difference is 0 and a different value of of diffenence will only be set if ftpsync.newversion already exist. But this will only be created if difference is greater or equal to 259200. So setting the initial value of difference to 259200 would fix the problem
--- bin/ftpsync~ 2017-06-18 20:10:57.751687258 +0200
+++ bin/ftpsync 2017-06-18 23:03:43.030115347 +0200
@@ -797,7 +797,7 @@
fi
if [[ ${LATEST} -gt ${VERSION} ]]; then
if [[ -n ${MAILTO} ]]; then
- difference=0
+ difference=259200
if [[ -f ${LOGDIR}/ftpsync.newversion ]]; then
stamptime=$(< "${LOGDIR}/ftpsync.newversion")
unixtime=$(date +%s)
@@ -830,7 +830,7 @@
rm -f "${LOGDIR}/ftpsync.newversion"
fi
fi
Christoph
--
============================================================================
Christoph Martin, Leiter Unix-Systeme
Zentrum für Datenverarbeitung, Uni-Mainz, Germany
Anselm Franz von Bentzel-Weg 12, 55128 Mainz
Telefon: +49(6131)3926337
Instant-Messaging: Jabber: [email protected]
(Siehe http://www.zdv.uni-mainz.de/4010.php)
<<attachment: martin.vcf>>
signature.asc
Description: OpenPGP digital signature

