mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 09:23:56 +00:00
b483d1d8a6
This solves an issue where the package `resources` and package `scripts` were being added to the root of the install drive. Change Spelling for: * xCode to XCode * and capitalize Command Line Tools to match Apple's offical documentation. Ref: https://developer.apple.com/xcode/ and https://developer.apple.com/library/ios/technotes/tn2339/_index.html
41 lines
1.4 KiB
Bash
Executable File
41 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
###############################################################################
|
|
#
|
|
# Title: Pre Install Script for Salt Installation
|
|
# Authors: Shane Lee
|
|
# Date: December 2015
|
|
#
|
|
# Description: This script stops the salt minion service before attempting to
|
|
# install Salt on Mac OSX
|
|
#
|
|
# Requirements:
|
|
# - None
|
|
#
|
|
# Usage:
|
|
# This script is run as a part of the OSX Salt Installation
|
|
#
|
|
###############################################################################
|
|
echo "Preinstall started on:" > /tmp/preinstall.txt
|
|
date >> /tmp/preinstall.txt
|
|
trap 'quit_on_error $LINENO $BASH_COMMAND' ERR
|
|
|
|
quit_on_error() {
|
|
echo "$(basename $0) caught error on line : $1 command was: $2" >> /tmp/preinstall.txt
|
|
exit -1
|
|
}
|
|
|
|
###############################################################################
|
|
# Stop the service
|
|
###############################################################################
|
|
if /bin/launchctl list "com.saltstack.salt.minion" &> /dev/null; then
|
|
echo "Stop service: Started..." >> /tmp/preinstall.txt
|
|
# /bin/launchctl unload "/Library/LaunchDaemons/com.saltstack.salt.minion.plist"
|
|
launchctl disable system/com.saltstack.salt.minion
|
|
launchctl bootout system /Library/LaunchDaemons/com.saltstack.salt.minion.plist
|
|
echo "Stop service: Successful" >> /tmp/preinstall.txt
|
|
fi
|
|
|
|
echo "Preinstall Completed Successfully" >> /tmp/preinstall.txt
|
|
|
|
exit 0
|