Skip to content

Instantly share code, notes, and snippets.

View gjpalau's full-sized avatar

Gilbert Palau gjpalau

View GitHub Profile
@gjpalau
gjpalau / addtologinhook.sh
Created February 11, 2015 23:20
login and log out hooks
sudo defaults write com.apple.loginwindow LoginHook /location/of/the/script.sh
sudo defaults write com.apple.loginwindow LogoutHook /Library/ETS/macrenamer.sh
@gjpalau
gjpalau / preconfig.sh
Created February 23, 2015 21:22
Sophos Pre-Config
./CreateOnAccessPreconfig -AutoLaunch "YES" -InArchives "NO" && sudo ./CreateUpdatePreconfig -PrimaryServerType 1 -PrimaryServerUserName SophosSvcAccount -PrimaryServerPassword \!4m31337 -PrimaryServerURL http://avupdate.yourdomaingoeshere.com:8195/sophosupdate/CIDs/S000/ESCOSX -SecondaryServerType 0 -SecondaryServerUserName username -SecondaryServerPassword changeme
@gjpalau
gjpalau / install-sophos.sh
Last active August 29, 2015 14:16
Script for Installing Sophos
#!/bin/bash
LOGGER="/usr/bin/logger"
# Determine working directory
install_dir=`dirname $0`
# Uninstall existing copy of Sophos 8.x by checking for the
# Sophos Antivirus uninstaller package in /Library/Sophos Anti-Virus.
# If present, the uninstallation process is run.
@gjpalau
gjpalau / gist:34c50e7b3d2bf5aea4db
Created February 23, 2015 21:32
stand alone install
"/usr/local/sophos/Sophos Installer.app/Contents/MacOS/tools/InstallationDeployer" --install
@gjpalau
gjpalau / gist:acf4d3ccf2450241d711
Created February 23, 2015 21:33
install stand alone line
"/usr/local/sophos/Sophos Installer.app/Contents/MacOS/InstallationDeployer" --install
@gjpalau
gjpalau / sophos-install-fw.sh
Created February 26, 2015 01:00
Shell Script to install Sophos with FileWave
#!/bin/bash
LOGGER="/usr/bin/logger"
# Determine working directory
install_dir=`dirname $0`
# Uninstall existing copy of Sophos 8.x by checking for the
# Sophos Antivirus uninstaller package in /Library/Sophos Anti-Virus.
# If present, the uninstallation process is run.
@gjpalau
gjpalau / box-download-install.sh
Last active December 16, 2015 16:19
Script to download and deploy Box Sync and Box Edit for Mac
#!/bin/bash
# Original Script by Bryson Tyrrell | bryson.tyrrell@gmail.com | http://twitter.com/bryson3gps
# Modified on December 16, 2015 by Gilbert Palau | Univision Desktop Engineering | gpalau@univision.net
#
installerOption="$4"
if [[ ${installerOption} = edit ]]; then
echo ""
echo "Downloading Box Edit"
@gjpalau
gjpalau / box-sync-edit-install.sh
Created December 16, 2015 16:23
FileWave Script for download and install of Box Sync + Box Edit
#!/bin/bash
# Original Script by Bryson Tyrrell | bryson.tyrrell@gmail.com | http://twitter.com/bryson3gps
# Modified on December 16, 2015 by Gilbert Palau | Univision Desktop Engineering | gpalau@univision.net
#
echo ""
echo "Downloading Box Edit"
webCheckSum=$(curl -sI https://e3.boxcdn.net/box-installers/boxedit/mac/currentrelease/BoxEditInstaller.dmg | tr -d '\r' | awk '/Content-Length/ {print $2}')
curl -fkS --progress-bar https://e3.boxcdn.net/box-installers/boxedit/mac/currentrelease/BoxEditInstaller.dmg -o /tmp/BoxEditInstaller.dmg
fileCheckSum=$(cksum /tmp/BoxEditInstaller.dmg | awk '{print $2}')
@gjpalau
gjpalau / boxsync-install.sh
Created December 17, 2015 18:11
Downloads and Install Box Sync for Mac
#!/bin/bash
policy="Box Sync 4"
loggertag="system-log-tag"
tmpdir="/tmp/"
downloadurl="https://e3.boxcdn.net/box-installers/sync/Sync+4+External/Box%20Sync%20Installer.dmg"
log() {
echo "$1"
/usr/bin/logger -t "$loggertag: $policy" "$1"
@gjpalau
gjpalau / boxedit-install.sh
Created December 17, 2015 18:13
Download and Install Box Edit 3.1.2 for Mac
#!/bin/bash
# Original Script by Bryson Tyrrell | bryson.tyrrell@gmail.com | http://twitter.com/bryson3gps
# Modified on December 16, 2015 by Gilbert Palau | Univision Desktop Engineering | gpalau@univision.net
#
# The BoxEdit components Box Local Com Server.app and Box Edit.app are launched via launch_app.sh code
# added with permission of Elliot Jordan <elliot@lindegroup.com>
# launch_app was created on 02-10-2015 and last modified by Elliot Jordan on 02-27-2015 | v1.2
# Integrated on 12-18-2015 by Gilbert Palau | Univision Desktop Engineering | gpalau@univision.net
#
# Much thanks to Bryson, who figured out the command line to install from within the app...