Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
AspieSoft committed May 7, 2023
1 parent a054320 commit a9bb683
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 3 additions & 2 deletions bin/apps/aspiesoft-clamav-scanner/scan-file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,12 @@ fi
echo "$FILE" >> $scanList

(
fileName=$(echo $FILE | sed -e "s#^$DIR/##")
fileName=$(echo "$FILE" | sed -e "s#^$DIR/##")

notify-send -i "/etc/aspiesoft-clamav-scanner/icon.png" -t 3 "Started Scanning" "$fileName"

clamscan -r --bell --move="/VirusScan/quarantine" --exclude-dir="/VirusScan/quarantine" $FILE &>/dev/null
sudo nice -n 15 clamscan &>/dev/null
clamscan -r --bell --move="/VirusScan/quarantine" --exclude-dir="/VirusScan/quarantine" "$FILE" &>/dev/null
sed "#^$FILE$#d" $scanList

if [ -s "$FILE" ] ; then
Expand Down
2 changes: 2 additions & 0 deletions bin/scripts/dnf/security.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ loading=$(startLoading "Installing Security Software")
#cp -R -f ./bin/apps/clamtk/* ~/.clamtk
#sudo sed -r -i "s/USERNAME/$USER/g" ~/.clamtk/cron

sudo dnf install cronie

sudo freshclam &>/dev/null
sudo mkdir -p /VirusScan/quarantine &>/dev/null
sudo chmod 664 /VirusScan/quarantine &>/dev/null
Expand Down
5 changes: 4 additions & 1 deletion bin/scripts/main/virus-scan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ echo
echo "Scanning for viruses..."

scanFinished=$(mktemp) && echo "false" >$scanFinished
(sudo clamscan -r --bell --move="/VirusScan/quarantine" --exclude-dir="/VirusScan/quarantine" --exclude-dir="/home/$USER/.clamtk/viruses" --exclude-dir="smb4k" --exclude-dir="/run/user/$USER/gvfs" --exclude-dir="/home/$USER/.gvfs" --exclude-dir=".thunderbird" --exclude-dir=".mozilla-thunderbird" --exclude-dir=".evolution" --exclude-dir="Mail" --exclude-dir="kmail" --exclude-dir="^/sys" $scanDir &> scan.log && echo "true" > $scanFinished) &
(
sudo nice -n 15 clamscan &>/dev/null
sudo clamscan -r --bell --move="/VirusScan/quarantine" --exclude-dir="/VirusScan/quarantine" --exclude-dir="/home/$USER/.clamtk/viruses" --exclude-dir="smb4k" --exclude-dir="/run/user/$USER/gvfs" --exclude-dir="/home/$USER/.gvfs" --exclude-dir=".thunderbird" --exclude-dir=".mozilla-thunderbird" --exclude-dir=".evolution" --exclude-dir="Mail" --exclude-dir="kmail" --exclude-dir="^/sys" $scanDir &> scan.log && echo "true" > $scanFinished
) &

tempFileCount=$(mktemp) && echo "false" >$tempFileCount
(echo $(sudo ls --ignore="/VirusScan/quarantine" --ignore="/home/$USER/.clamtk/viruses" --ignore="smb4k" --ignore="/run/user/$USER/gvfs" --ignore="/home/$USER/.gvfs" --ignore=".thunderbird" --ignore=".mozilla-thunderbird" --ignore=".evolution" --ignore="Mail" --ignore="kmail" --ignore="^/sys" -l -R $scanDir | grep ^- | awk '{print $9}' | wc -l) > $tempFileCount) &
Expand Down

0 comments on commit a9bb683

Please sign in to comment.