From 8fdc9b81d9fe38b5e9d28a8e6cb4fed36f4ec901 Mon Sep 17 00:00:00 2001 From: Nathan Palmer Date: Mon, 10 Aug 2015 18:18:43 -0700 Subject: [PATCH 1/3] Writing hologram agent out to /usr/local/bin instead of /usr/bin because of the newly introduced System Integrity Protection in OS X 10.11 --- buildscripts/build_osx_pkgs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/buildscripts/build_osx_pkgs.sh b/buildscripts/build_osx_pkgs.sh index 8dc234a..5b36526 100755 --- a/buildscripts/build_osx_pkgs.sh +++ b/buildscripts/build_osx_pkgs.sh @@ -9,13 +9,13 @@ if [ "$1" != "--no-compile" ]; then fi mkdir -p /hologram-build/darwin/{root,scripts} -mkdir -p /hologram-build/darwin/root/usr/bin/ +mkdir -p /hologram-build/darwin/root/usr/local/bin/ mkdir -p /hologram-build/darwin/root/etc/hologram/ mkdir -p /hologram-build/darwin/root/Library/LaunchDaemons mkdir -p /hologram-build/darwin/scripts mkdir -p /hologram-build/darwin/flat/base.pkg/ -install -m 0755 ${BIN_DIR}/darwin_amd64/hologram{-agent,,-authorize,-boot} /hologram-build/darwin/root/usr/bin/ +install -m 0755 ${BIN_DIR}/darwin_amd64/hologram{-agent,,-authorize,-boot} /hologram-build/darwin/root/usr/local/bin/ install -m 0644 ${HOLOGRAM_DIR}/config/agent.json /hologram-build/darwin/root/etc/hologram/agent.json install -m 0644 ${HOLOGRAM_DIR}/agent/support/darwin/com.adroll.hologram{-ip,-me,}.plist /hologram-build/darwin/root/Library/LaunchDaemons/ install -m 0755 ${HOLOGRAM_DIR}/agent/support/darwin/postinstall.sh /hologram-build/darwin/scripts/postinstall From 3423cea4f4f0e38ddb4e0caa318f35802b835a2a Mon Sep 17 00:00:00 2001 From: Nathan Palmer Date: Tue, 11 Aug 2015 10:51:50 -0700 Subject: [PATCH 2/3] Updated com.adroll.hologram-me.plist and com.adroll.hologram.plist to reference the new path in /usr/local/bin --- agent/support/darwin/com.adroll.hologram-me.plist | 2 +- agent/support/darwin/com.adroll.hologram.plist | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/support/darwin/com.adroll.hologram-me.plist b/agent/support/darwin/com.adroll.hologram-me.plist index bf77ac7..261b2c2 100644 --- a/agent/support/darwin/com.adroll.hologram-me.plist +++ b/agent/support/darwin/com.adroll.hologram-me.plist @@ -8,7 +8,7 @@ ProgramArguments - /usr/bin/hologram-boot + /usr/local/bin/hologram-boot RunAtLoad diff --git a/agent/support/darwin/com.adroll.hologram.plist b/agent/support/darwin/com.adroll.hologram.plist index 6cbe199..439be0c 100644 --- a/agent/support/darwin/com.adroll.hologram.plist +++ b/agent/support/darwin/com.adroll.hologram.plist @@ -8,7 +8,7 @@ ProgramArguments - /usr/bin/hologram-agent + /usr/local/bin/hologram-agent StandardOutPath /var/log/hologram.log From 43e8d4578b267e9057e23c91e056087de6cb8c48 Mon Sep 17 00:00:00 2001 From: Nathan Palmer Date: Thu, 1 Oct 2015 12:05:10 -0400 Subject: [PATCH 3/3] Added a removal of previous /usr/bin binaries during postinstall on mac if they exist --- agent/support/darwin/postinstall.sh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/agent/support/darwin/postinstall.sh b/agent/support/darwin/postinstall.sh index b8ba7a9..aee1d2b 100755 --- a/agent/support/darwin/postinstall.sh +++ b/agent/support/darwin/postinstall.sh @@ -2,13 +2,30 @@ # Remove the previous version of Hologram. launchctl unload -w /Library/LaunchDaemons/com.adroll.hologram.plist +# Remove previous (old location) hologram binaries if they exist +if [ -f "/usr/bin/hologram-boot" ]; then + rm /usr/bin/hologram-boot +fi + +if [ -f "/usr/bin/hologram-agent" ]; then + rm /usr/bin/hologram-agent +fi + +if [ -f "/usr/bin/hologram-authorize" ]; then + rm /usr/bin/hologram-authorize +fi + +if [ -f "/usr/bin/hologram" ]; then + rm /usr/bin/hologram +fi + # Copy our previous config file over the new one if [ -f "/etc/hologram/agent.json.save" ]; then mv /etc/hologram/agent.json /etc/hologram/agent.json.pkgnew mv /etc/hologram/agent.json.save /etc/hologram/agent.json fi +# Load the services launchctl load -w /Library/LaunchDaemons/com.adroll.hologram-ip.plist launchctl load -w /Library/LaunchDaemons/com.adroll.hologram.plist launchctl load -w /Library/LaunchAgents/com.adroll.hologram-me.plist -