Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > uk.comp.sys.mac > #141154
| Path | csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Snit <usenet@gallopinginsanity.com> |
| Newsgroups | uk.comp.sys.mac |
| Subject | Re: Scripts - help requested with this, please. |
| Date | Thu, 27 Feb 2020 02:27:50 -0700 |
| Lines | 206 |
| Message-ID | <hbpgcnFe2o5U1@mid.individual.net> (permalink) |
| References | <zUL1E.100968$Yn2.84258@fx26.fr7> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-Trace | individual.net 6Sj58hIKQ4hwwhIZDC/+7Awz5UxasR6J1mI35XgAG3XQg/I74w |
| Cancel-Lock | sha1:+tprdXKr/tySkNpnjmQ2K/CHg1Q= |
| User-Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
| In-Reply-To | <zUL1E.100968$Yn2.84258@fx26.fr7> |
| Content-Language | en-US |
| Xref | csiph.com uk.comp.sys.mac:141154 |
Show key headers only | View raw
On 1/22/19 2:26 PM, David B. wrote:
> #!/bin/bash
>
> /usr/bin/killall -9 clamscan
> /usr/bin/killall -9 clamdscan
> /bin/rm /tmp/clamd3.socket
>
> LOGGED_IN_USER_ID=`id -u "${USER}"`
>
>
> # Remove ClamXAV 2 bits
> # PrivilegedHelper and plist
> if [ -e /Library/LaunchDaemons/uk.co.canimaansoftware.ClamXavHelper.plist ]
> then
> echo "remove very old Privileged Helper launchdaemon"
> /bin/launchctl unload
> /Library/LaunchDaemons/uk.co.canimaansoftware.ClamXavHelper.plist
> /bin/rm
> /Library/LaunchDaemons/uk.co.canimaansoftware.ClamXavHelper.plist
>
> /usr/bin/killall -9 uk.co.canimaansoftware.ClamXavHelper
> /bin/rm
> /Library/PrivilegedHelperTools/uk.co.canimaansoftware.ClamXavHelper
> fi
> if [ -e
> /Library/LaunchDaemons/uk.co.canimaansoftware.ClamXavHelperUpdater.plist ]
> then
> echo "remove old Privileged Helper updater launchdaemon"
> /bin/launchctl unload
> /Library/LaunchDaemons/uk.co.canimaansoftware.ClamXavHelperUpdater.plist
> /bin/rm
> /Library/LaunchDaemons/uk.co.canimaansoftware.ClamXavHelperUpdater.plist
>
> /usr/bin/killall -9 uk.co.canimaansoftware.ClamXavHelperUpdater
> /bin/rm
> /Library/PrivilegedHelperTools/uk.co.canimaansoftware.ClamXavHelperUpdater
> fi
>
> # old scan schedules
> for homeFolderPath in /Users/*; do
> if [ -e
> $homeFolderPath/Library/LaunchAgents/uk.co.markallan.clamxav.clamscan.plist
> ]
> then
> echo "remove very old scan schedules"
> /bin/launchctl asuser "${LOGGED_IN_USER_ID}" /bin/launchctl
> unload
> $homeFolderPath/Library/LaunchAgents/uk.co.markallan.clamxav.clamscan.plist
> /bin/rm
> $homeFolderPath/Library/LaunchAgents/uk.co.markallan.clamxav.clamscan.plist
> fi
> if [ -e
> $homeFolderPath/Library/LaunchAgents/uk.co.canimaansoftware.clamxav.clamscan.plist
> ]
> then
> echo "remove old scan schedules"
> /bin/launchctl asuser "${LOGGED_IN_USER_ID}" /bin/launchctl
> unload
> $homeFolderPath/Library/LaunchAgents/uk.co.canimaansoftware.clamxav.clamscan.plist
>
> /bin/rm
> $homeFolderPath/Library/LaunchAgents/uk.co.canimaansoftware.clamxav.clamscan.plist
>
> fi
> if [ -e
> $homeFolderPath/Library/LaunchAgents/uk.co.markallan.clamxav.freshclam.plist
> ]
> then
> echo "remove very old update schedules"
> /bin/launchctl asuser "${LOGGED_IN_USER_ID}" /bin/launchctl
> unload
> $homeFolderPath/Library/LaunchAgents/uk.co.markallan.clamxav.freshclam.plist
>
> /bin/rm
> $homeFolderPath/Library/LaunchAgents/uk.co.markallan.clamxav.freshclam.plist
>
> fi
> if [ -e
> $homeFolderPath/Library/LaunchAgents/uk.co.canimaansoftware.clamxav.freshclam.plist
> ]
> then
> echo "remove old update schedules"
> /bin/launchctl asuser "${LOGGED_IN_USER_ID}" /bin/launchctl
> unload
> $homeFolderPath/Library/LaunchAgents/uk.co.canimaansoftware.clamxav.freshclam.plist
>
> /bin/rm
> $homeFolderPath/Library/LaunchAgents/uk.co.canimaansoftware.clamxav.freshclam.plist
>
> fi
> # old uninstall watcher
> if [ -e
> $homeFolderPath/Library/LaunchAgents/uk.co.canimaansoftware.clamxav.UninstallWatcher.plist
> ]
> then
> echo "remove old uninstall watcher"
> /bin/launchctl asuser "${LOGGED_IN_USER_ID}" /bin/launchctl
> unload
> $homeFolderPath/Library/LaunchAgents/uk.co.canimaansoftware.clamxav.UninstallWatcher.plist
>
> /bin/rm
> $homeFolderPath/Library/LaunchAgents/uk.co.canimaansoftware.clamxav.UninstallWatcher.plist
>
> fi
> done
>
> # old scanning engine
> if [ -d /usr/local/clamXav ]
> then
> echo "remove old scanning engine"
> /bin/rm -rf /usr/local/clamXav
> fi
>
> # ClamXAV 3 bits
>
> if [ -e
> /Library/LaunchDaemons/uk.co.canimaansoftware.ClamXAV.HelperTool.plist ]
> then
> echo "unload old Privileged Helper launchdaemon"
> /bin/launchctl unload
> /Library/LaunchDaemons/uk.co.canimaansoftware.ClamXAV.HelperTool.plist
>
> /usr/bin/killall -9 uk.co.canimaansoftware.ClamXAV.HelperTool
> /bin/rm
> /Library/PrivilegedHelperTools/uk.co.canimaansoftware.ClamXAV.HelperTool
> fi
>
> if [ -e
> /Library/LaunchDaemons/uk.co.canimaansoftware.ClamXAV.HelperToolUpdater.plist
> ]
> then
> echo "unload old Privileged Helper Updater launchdaemon"
> /bin/launchctl unload
> /Library/LaunchDaemons/uk.co.canimaansoftware.ClamXAV.HelperToolUpdater.plist
>
>
> /usr/bin/killall uk.co.canimaansoftware.ClamXAV.HelperToolUpdater
> /bin/rm
> /Library/PrivilegedHelperTools/uk.co.canimaansoftware.ClamXAV.HelperToolUpdater
>
> fi
>
> if [ -e
> /Library/LaunchDaemons/uk.co.canimaansoftware.ClamXAV.Engine.plist ]
> then
> echo "unload old clamd launchdaemon"
> /bin/launchctl unload
> /Library/LaunchDaemons/uk.co.canimaansoftware.ClamXAV.Engine.plist
> /Library/LaunchDaemons/uk.co.canimaansoftware.ClamXAV.Engine.plist
> else
> echo "No old clamd launchdeamon found"
> fi
>
> if [ -e
> /Library/LaunchAgents/uk.co.canimaansoftware.ClamXAV.UI-Helper.plist ]
> then
> echo "unload old UI Helper launchdaemon"
> if [ "${COMMAND_LINE_INSTALL}" = "" ]
> then
> /bin/launchctl asuser "${LOGGED_IN_USER_ID}" /bin/launchctl
> unload /Library/LaunchAgents/uk.co.canimaansoftware.ClamXAV.UI-Helper.plist
> fi
> /bin/rm
> /Library/LaunchAgents/uk.co.canimaansoftware.ClamXAV.UI-Helper.plist
> else
> echo "No old UI Helper launchdaemon found"
> fi
>
> # kill GUI apps
> /usr/bin/pkill -9 ClamX
>
> if [ -e /usr/local/ClamXAV3 ]
> then
> echo "remove old scanning engine"
> rm -rf /usr/local/ClamXAV3
> else
> echo "No old scanning engine found"
> fi
>
> mkdir -p "/usr/local/"
> mkdir -p "/Library/Application Support/ClamXAV/Settings/users"
> mkdir -p "/Library/Application Support/ClamXAV/Settings/Licence"
> mkdir -p "/Library/Application Support/ClamXAV/Quarantine"
> mkdir -p "/Library/Application Support/ClamXAV/Logs"
>
Where did you get this script? Is this the uninstaller from ClamXAV?
Just skimming through it that is my guess... and it looks like they are
just removing their own files. I see nothing worrisome in it.
Just to do a quick check I removed all lines that had the word "clam" in
them (the file names if nothing else). No other files are listed for
deletion.
If does, at the end, make a number of directories (mkdir) and I am not
sure why. The -p just says to make the parent directories if needed and
not to give an error if the directoty already exists.
--
Personal attacks from those who troll show their own insecurity. They
cannot use reason to show the message to be wrong so they try to feel
somehow superior by attacking the messenger.
They cling to their attacks and ignore the message time and time again.
Back to uk.comp.sys.mac | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Scripts - help requested with this, please. Snit <usenet@gallopinginsanity.com> - 2020-02-27 02:27 -0700 Re: Scripts - help requested with this, please. David <David@address.invalid> - 2020-02-28 15:59 +0000
csiph-web