Para habilitar o deshabilitar ZScaler Client Connector sin deslogearse en el Internet Securtity y/o ZScaler Private Access (ZPA), Corremos estos comandos
#!/bin/bash
aviso () {
echo ====================
echo $@
echo ====================
}
aviso ---------Chau Zscaler-------
aviso Mantando ZSTray
pkill ZSTray
aviso Deshabilitando servicios
sudo systemctl disable --now zsaservice zstunnel
if [ -f /usr/share/applications/ZSTray.desktop ] ; then
aviso Deshabilitando ZSTray
sudo mv /usr/share/applications/ZSTray.desktop /usr/share/applications/ZSTray.desktop_
fi
if [ -f /etc/opt/chrome/policies/managed/*.json ] ; then #Acá va la que tenga el proxy
aviso Deshabilitando policies
sudo mv /etc/opt/chrome/policies/managed/*.json $HOME/ #Acá va la que tenga el proxy
fi
aviso Mostrando resultados
ls -la /etc/opt/chrome/policies/managed/*.json /usr/share/applications/ZSTray.desktop* $HOME/*.json 2>/dev/null
echo -n "pgrep ZSTray .. "
pgrep ZSTray || echo .
echo Servicios
sudo systemctl status zsaservice zstunnel
#!/bin/bash
aviso () {
echo ====================
echo $@
echo ====================
}
aviso ---------Hola Zscaler-------
aviso Habilitando servicios
sudo systemctl enable --now zsaservice zstunnel
if [ ! -f /etc/opt/chrome/policies/managed/*.json ] ; then #Acá va la que tenga el proxy
aviso Habilitando policies
sudo mv $HOME/*.json /etc/opt/chrome/policies/managed/ #Acá va la que tenga el proxy
fi
if [ ! -f /usr/share/applications/ZSTray.desktop ] ; then
aviso Habilitando ZSTray
sudo mv /usr/share/applications/ZSTray.desktop_ /usr/share/applications/ZSTray.desktop
fi
aviso iniciando ZSTray
/opt/zscaler/scripts/zstray_desktop.sh %u &>/dev/null &
aviso Mostrando resultados
ls -la /etc/opt/chrome/policies/managed/*.json /usr/share/applications/ZSTray.desktop* $HOME/*.json 2>/dev/null
echo -n "pgrep ZSTray .. "
pgrep ZSTray || echo .
echo Servicios
sudo systemctl status zsaservice zstunnel
