This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################################################################################# | |
# This script assumes, JSS is using default read and write usernames: jamf, jamfadmin | |
# This script also assumes that local administrator account used on the mac is named: administrator | |
################################################################################################################# | |
#Ask user to point to the share folder, browse to it via "cd" | |
FOLDER_TO_PROCESS=$(/usr/bin/osascript << EOD | |
tell application "System Events" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################################################################################# | |
# This script can be used together with "JAMF UAPI LAPS initialization script which will set LAPS Computer Extension Attribute to a desired password" | |
# URL of the other script: https://gist.github.com/shurkin18/50ae6e9da329a9332592df19e10744bb | |
################################################################################################################# | |
# Please note: this script requires jq JSON parser to be installed on the mac, otherwise the script won't work | |
# You can install jq JSON parser using brew by running this script, which will install brew and jq automatically (non-interactive): | |
# https://gist.github.com/shurkin18/62ec34967794a32f9d63615db881ab5c | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################################################################################# | |
# This script can be used together with: https://gist.github.com/shurkin18/b8de3de44b184f1f8802b860639a9b4d | |
################################################################################################################# | |
# Please note: this script requires jq JSON parser to be installed on the mac, otherwise the script won't work | |
# You can install jq JSON parser using brew by running this script, which will install brew and jq automatically (non-interactive): | |
# https://gist.github.com/shurkin18/62ec34967794a32f9d63615db881ab5c | |
# | |
# There is also an alternative way of running jq JSON parser, without installing the whole brew suite |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################################################################################################################# | |
# Update the following variables as needed: "apiUser", "apiPass", "apiURL" | |
################################################################################################################# | |
# server connection information | |
jssurl="API URL" | |
username="API USERNAME" | |
password="API PASSWORD" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
########################################################################################################################################################################## | |
########################################################################################################################################################################## | |
# Please note: this script requires jq JSON parser to be installed on the mac, otherwise the script won't work | |
# You can install jq JSON parser using brew by running this script, which will install brew and jq automatically (non-interactive): | |
# https://gist.github.com/shurkin18/62ec34967794a32f9d63615db881ab5c | |
# | |
# There is also an alternative way of running jq JSON parser, without installing the whole brew suite | |
# You can download the jq binary here: https://techstoreon.com/files/jq-osx-amd64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set +x | |
user=`ls -l /dev/console | awk '//{print $3}'` | |
echo "loggedInUser:" $user | |
echo " Stopping inSync Client." | |
killall inSync | |
killall inSyncDecommission |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################################################################################### | |
# There is also an alternative way of running jq JSON parser, without installing the whole brew suite | |
# You can download the jq binary here: https://techstoreon.com/files/jq-osx-amd64 | |
# Pre-load it to each mac via the policy and store it somewhere (in /var for example) and just point your script to it | |
# every time jq needs to be used | |
########################################################################################### | |
#!/bin/bash | |
# Checks if jq is not already present, and if not - installs brew via script, then installs/loads jq JSON parser | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Variables, dmgPath is where the DMG installer will be located and the packageName is the installer inside the DMG, | |
# usually it's someting like Install.pkg or Install.mpkg, you need to know what it is and supply it to "packageName" variable | |
# Update these variables based on the DMG/installer you will be using this script on | |
dmgPath="/Users/Shared/Application.dmg" | |
packageName="Install.pkg" | |
################################################################ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Please note: JIRA URL may be different for your setup, including all of the URL | |
# https://COMPANY-JIRA-URL.com/jira/rest/api/2/issue/ | you may need to play around with it to get it exact right | |
currentLoggedInUser=`stat -f '%u %Su' /dev/console | awk '{ print $2 }'` | |
echo "Currently logged in user is: $currentLoggedInUser" | |
#Create JIRA API ticket | |
curl \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#################################################################################################################################### | |
# NOTE: you will need to generate a token (https://id.atlassian.com/manage-profile/security/api-tokens and click "Create API token") | |
# Make sure that account has necessary access (JIRA groups) on the JIRA's end, especially if you will be creating tickets via API | |
# In this example, we will search JIRA for issues with a specific title and specific reporter | |
# and if nothing found the script will create a new issue/ticket under Project "IT" and a specific Issue Type ID we set, assigned (Reporter) to currently logged in user (NOTE: this is for mac only), with specific Issue title and description | |
#################################################################################################################################### | |
#################################################################################################################################### |
OlderNewer