Last active
January 29, 2018 11:41
-
-
Save micw/376bab5b412c019af050097a0079123d to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
set -e | |
pkgs=(libclamav7 libclamav-dev clamav-base clamav-daemon clamav-dbg clamav-docs clamav-freshclam clamav-milter clamav-testfiles clamav) | |
installed_pkgs=( $( dpkg-query -f '${binary:Package}\n' -W | grep clamav ) ) | |
update_pkgs=() | |
for p1 in "${pkgs[@]}"; do | |
for p2 in "${installed_pkgs[@]}"; do | |
if [[ $p1 == "$p2" ]]; then | |
update_pkgs+=( "$p1" ) | |
break | |
fi | |
done | |
done | |
echo "Please run the following commands:" | |
echo "apt-get remove --purge clamdscan" | |
for p in "${update_pkgs[@]}"; do | |
suffix="amd64" | |
if [ $p == "clamav-base" -o $p == "clamav-docs" -o $p == "clamav-testfiles" ]; then | |
suffix="all" | |
fi | |
file=${p}_0.99.2+dfsg-0+deb8u4_${suffix}.deb | |
echo dpkg -i ${file} | |
done | |
echo "killall -9 clamd; service clamav-daemon restart" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment