Quiero poder desinstalar Little Snitch sobre Apple Remote Desktop. Encontré el siguiente script aquí: http://fromtheadmin.com/kill-and-remove-little-snitch-application-via-ard-script/
Sin embargo, cuando ejecuto el script localmente en una máquina de prueba con Little Snitch ejecutándose, la Terminal devuelve "No se encontraron procesos coincidentes que le pertenezcan". Puedo ver los procesos de Little Snitch UIAgent y Little Snitch Network Monitor en Activity Monitor ejecutándose en la misma cuenta desde la que se ejecuta el script.
¿Algunas ideas?
#!/bin/sh
NetworkMonitor="Little Snitch Network Monitor"
UIAgent="Little Snitch UIAgent"
File="/Library/LaunchAgents/at.obdev.LittleSnitchNetworkMonitor.plist"
#remove Little Snitch files and User Preferences
if [ -f $File ] ; then
#Kill Little Snitch Processes
killall $NetworkMonitor
killall $UIAgent
rm -R /Library/Application\ Support/Objective\ Development/
rm -R /Library/LaunchAgents/at.obdev.LittleSnitchNetworkMonitor.plist
rm -R /Library/LaunchAgents/at.obdev.LittleSnitchUIAgent.plist
rm -R /Library/LaunchDaemons/at.obdev.littlesnitchd.plist
rm -R /Library/Little\ Snitch/*
rm -R /Library/Logs/LittleSnitchDaemon.log
rm -R /System/Library/Extensions/LittleSnitch.kext
rm -R "/Applications/Little Snitch Configuration.app"
usr/sbin/jamf displayMessage -message "Computer is shutting down"
sleep 10
reboot -q
exit 0
else
exit 0
fi
Gracias.
Hay varios problemas con ese script:
nohup
formas batch
de hacerlo)reboot -q
: No hagas eso. Es más seguro en MacOS moderno de lo que ha sido históricamente, pero aún puede ser un problema. Es mejor usar shutdown -r +1 "Rebooting for software change"
lo que da un período de gracia de un minuto, publica ese mensaje en cualquier shell interactivo y usa los mecanismos de lanzamiento adecuados para cerrar todo. Si quiere ser menos cortés, use "ahora" y/o ningún mensaje.ALERTA : esta respuesta ha sido probada y aparentemente no funciona. Sin embargo, dejo la respuesta aquí para ayudar a otros a diagnosticar el problema.
Cuando ejecuta la secuencia de comandos, $NetworkMonitor
se convierte Little Snitch Network Monitor
en lugar de la requerida "Little Snitch Network Monitor"
(para hacer frente a los espacios).
Cambiaría las primeras tres líneas de su código a:
#!/bin/sh
NetworkMonitor="\"Little Snitch Network Monitor\""
UIAgent="\"Little Snitch UIAgent\""
Creo que eso podría solucionar tu problema. Si no, házmelo saber.
TestMac:~ TestUser$ sh /Users/TestUser/Desktop/LS\ Script\ Test/LS.sh No matching processes belonging to you were found No matching processes belonging to you were found override rw-r--r-- root/wheel for /Library/Application Support/Objective Development//Little Snitch/.lsd?
$UIAgent
y $NetworkMonitor
) y colocar los nombres de los procesos directamente con los killall
comandos (entre comillas, todavía).Deberá iniciar sesión como usuario administrativo y ejecutar el script como usuario raíz escribiendo "sudo" delante de sus comandos:
sudo /path/to/your/script.sh
mmmmmm
Pablo
Joost
Pablo
bmike