Skip to content

Commit

Permalink
Merge pull request #59 from nathanpalmer/el-capitan
Browse files Browse the repository at this point in the history
Installer support for OS X 10.11 (El Capitan)
  • Loading branch information
walterking committed Oct 1, 2015
2 parents 3dccd62 + 43e8d45 commit 8687a33
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion agent/support/darwin/com.adroll.hologram-me.plist
Expand Up @@ -8,7 +8,7 @@
<false/>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/hologram-boot</string>
<string>/usr/local/bin/hologram-boot</string>
</array>
<key>RunAtLoad</key>
<true/>
Expand Down
2 changes: 1 addition & 1 deletion agent/support/darwin/com.adroll.hologram.plist
Expand Up @@ -8,7 +8,7 @@
<true/>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/hologram-agent</string>
<string>/usr/local/bin/hologram-agent</string>
</array>
<key>StandardOutPath</key>
<string>/var/log/hologram.log</string>
Expand Down
19 changes: 18 additions & 1 deletion agent/support/darwin/postinstall.sh
Expand Up @@ -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

4 changes: 2 additions & 2 deletions buildscripts/build_osx_pkgs.sh
Expand Up @@ -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
Expand Down

0 comments on commit 8687a33

Please sign in to comment.