opt
/
kaspersky
/
kav4fs
/
libexec
➕ New
📤 Upload
✎ Editing:
cleanup.sh
← Back
#!/bin/sh paths="/opt/kaspersky/kav4fs /etc/opt/kaspersky/kav4fs /var/log/kaspersky/kav4fs /var/run/kav4fs-samba /var/run/kav4fs /var/opt/kaspersky/kav4fs" app="Kaspersky Anti-Virus for Linux File Server" if [ "$1" != "--confirm-delete" ] then echo echo "The script deletes all files and directories left after" echo "\"$app\" application" echo "package deinstallation." echo echo "In case of user confirmation (below) ALL data of the application will be" echo "deleted, including but not limited to: configuration files, log files," echo "quarantined files, AV-signatures, etc." echo # # Display dirs to be removed # echo "The following items will be removed:" for path in $paths do if [ -d "$path" ] ; then echo " Directory $path/" elif [ -S "$path" ] ; then echo " Socket $path" elif [ -f "$path" ] ; then echo " File $path" else # skip files and dirs what not exists already continue fi done echo # # User confirmation required to delete all # while : do echo "Do you want to delete ALL \"$app\"" echo -n "application data (yes/no)? [no]: " read answer [ -z "$answer" ] && answer=no if [ "$answer" = "no" ] ; then echo echo "Canceled." exit 1 elif [ "$answer" = "yes" ] ; then break else echo echo "Please answer either 'yes' or 'no'." fi done fi echo echo "Delete \"$app\" data:" for path in $paths do if [ -d "$path" ] ; then rm -rf "$path" || exit 1 echo " Directory $path/ is removed." elif [ -S "$path" ] ; then rm -f "$path" || exit 1 echo " Socket $path is removed." elif [ -f "$path" ] ; then rm -f "$path" || exit 1 echo " File $path is removed." fi done
💾 Save Changes
Cancel
📤 Upload File
×
Select File
Upload
Cancel
➕ Create New
×
Type
📄 File
📁 Folder
Name
Create
Cancel
✎ Rename Item
×
Current Name
New Name
Rename
Cancel
🔐 Change Permissions
×
Target File
Permission (e.g., 0755, 0644)
0755
0644
0777
Apply
Cancel