* #23256: insserv i init skripta
* vise se ne koristi /etc/init.d/amavis, vec samo /etc/init.d/amavisd-cn
+ * ispravke razlicitih Lintian gresaka, kao logike (registriranje amavisd-cn
+ init skripte mjesto amavis skripte i vracanje nakon deinstalacije paketa)
-- Dinko Korunic <kreator@carnet.hr> Sat, 02 Apr 2011 12:28:15 +0200
* chown datoteka u slucaju upgradea sa woodyja.
* Dodavanje grupe amavis ako je potrebno.
- -- Zeljko Boros <zelja@ravnica.ptfos.hr>
+ -- Zeljko Boros <zelja@ravnica.ptfos.hr> Wed, 24 Mar 2004 10:26:51 +0100
amavisd-cn (20030616p7-3) testing; urgency=low
Package: amavisd-cn
Architecture: all
Provides: amavisd-new-cn
-Depends: amavisd-new (>= 1:2.6.4-3), postfix, clamav-cn (>= 3:0.94-5), spamassassin-cn (>= 2:3.2.5-6), debianutils, carnet-tools-cn (>= 2.8.1), procps, arj | unarj, rar | unrar | unrar-free, zoo, nomarch, cpio, lzop, cabextract, zip, unzip, bzip2
+Depends: amavisd-new (>= 1:2.6.4-3), postfix, clamav-cn (>= 3:0.94-5), spamassassin-cn (>= 2:3.2.5-6), debianutils (>= 3.4), carnet-tools-cn (>= 2.8.1), procps, arj | unarj, rar | unrar | unrar-free, zoo, nomarch, cpio, lzop, cabextract, zip, unzip, bzip2
Pre-Depends: amavisd-new (>= 1:2.6.4-3)
Recommends: postfix-cn
Conflicts: libsavi-perl (<< 0.15), bunch-perl-modules-cn
istart)
start clamd
start amavis
- /etc/init.d/$mta start
+ if [ -x "/etc/init.d/$mta" ]; then
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+ invoke-rc.d $mta start
+ else
+ /etc/init.d/$mta start
+ fi
+ fi
;;
istop)
- /etc/init.d/$mta stop
+ if [ -x "/etc/init.d/$mta" ]; then
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+ invoke-rc.d $mta stop
+ else
+ /etc/init.d/$mta stop
+ fi
+ fi
stop amavis
stop clamd
;;
# kill naughty pyzor descendants -- XXX needed for 2.4 or not?
if dpkg --compare-versions "$2" lt 2:20030616p10-7 && \
- pgrep -u amavis -f '/usr/bin/pyzor check' > /dev/null; then
- /etc/init.d/amavisd-cn stop
+ pgrep -u amavis -f '/usr/bin/pyzor check' > /dev/null; then
+ if [ -x "/etc/init.d/amavisd-cn" ]; then
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+ invoke-rc.d amavisd-cn stop
+ else
+ /etc/init.d/amavisd-cn stop
+ fi
+ fi
pkill -9 -u amavis -f '/usr/bin/pyzor check' > /dev/null || true
- /etc/init.d/amavisd-cn start
+ if [ -x "/etc/init.d/amavisd-cn" ]; then
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+ invoke-rc.d amavisd-cn start
+ else
+ /etc/init.d/amavisd-cn start
+ fi
+ fi
restart_daemon=
restart_mta=
fi
+# register for automatic start
+update-rc.d -f amavis remove >/dev/null || true
+update-rc.d amavisd-cn defaults 19 21 >/dev/null
+
# START AMAVISD
# about a half of amavisd-cn script is here
if [ "$restart_daemon" -a -x /etc/init.d/amavis.amavisd-new ]; then
- /etc/init.d/amavis.amavisd-new restart
+ if [ -x "/etc/init.d/amavis.amavisd-new" ]; then
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+ invoke-rc.d amavis.amavisd-new restart
+ else
+ /etc/init.d/amavis.amavisd-new restart
+ fi
+ fi
fi
# always check that the daemons are running
if ! wait_for_fds amavis; then
- /etc/init.d/amavis.amavisd-new start
+ if [ -x "/etc/init.d/amavis.amavisd-new" ]; then
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+ invoke-rc.d amavis.amavisd-new start
+ else
+ /etc/init.d/amavis.amavisd-new start
+ fi
+ fi
wait_for_fds amavis
fi
if [ "$restart_mta" ]; then
- /etc/init.d/$mta restart
+ if [ -x "/etc/init.d/$mta" ]; then
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+ invoke-rc.d $mta restart
+ else
+ /etc/init.d/$mta restart
+ fi
+ fi
fi
# this needs to be updated when $CRONTAB file changes
rm -f /etc/init.d/amavis
dpkg-divert --quiet --package amavisd-cn --remove --rename \
--divert /etc/init.d/amavis.amavisd-new /etc/init.d/amavis || true
+ update-rc.d amavis defaults 19 21 >/dev/null || true
fi
if [ "$1" = purge ]; then
# /var/run/amavis now deleted in /etc/init.d/amavisd
# keeping virusmails until --purge is used
rm -fr /var/lib/amavis/amavis*
+ update-rc.d amavisd-cn remove >/dev/null || true
fi
# dh_installman
# dh_link
# dh_strip
-# dh_compress
+ dh_compress
dh_fixperms
# dh_perl
# dh_python
# dh_makeshlibs
dh_installdeb
# dh_shlibdeps
- sed -i '/init\.d/d' debian/amavisd-cn/DEBIAN/conffiles
dh_gencontrol
dh_md5sums
dh_builddeb