Skip to content

Instantly share code, notes, and snippets.

View patgmac's full-sized avatar

Patrick Gallagher patgmac

  • Atlanta, GA
  • 22:29 (UTC -05:00)
View GitHub Profile
#!/bin/sh
scriptDir=$(dirname "$0")
if [ -e "/Library/Application Support/LANrev Agent/LANrev Agent.app/Contents/Resources/CobraClientDebugUI.nib/classes.nib" ]; then
rm "/Library/Application Support/LANrev Agent/LANrev Agent.app/Contents/Resources/CobraClientDebugUI.nib/classes.nib"
echo "Deleting classes.nib"
else
echo "Did not find classes.nib"
fi
#!/bin/sh
fmm=`nvram -x -p | grep fmm-mobileme-token`
if [[ "$fmm" =~ "fmm-mobileme" ]]; then
echo "Enabled"
else
echo "Disabled"
fi
exit 0
By default these URLs are disabled. They need to be enabled by an Admin
side server pref key
Key: AllowURLSDPackageImport
Type: Boolean
Dafault: false
This implemented via a URL schema. To import a package use
lanrevadmin://importsoftwarepackage?packagepath=/tmp/mypackage.amsdpackages
&committoserver=1
@patgmac
patgmac / .bash_profile
Last active October 28, 2015 19:56 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@patgmac
patgmac / kickstartam.sh
Created February 23, 2016 21:20 — forked from MagerValp/kickstartam.sh
Force Absolute Manage agent to install packages without delay.
#!/bin/bash
#
# Force Absolute Manage to install software at the login window.
declare -r AMSERVER="your.amserver.example"
declare -r AMDIR="/Library/Application Support/LANrev Agent"
declare -r AMAGENT="$AMDIR/LANrev Agent.app/Contents/MacOS/LANrev Agent"
declare -r LOGFILE="/var/log/kickstartam.log"
#!/bin/bash
#
# Force Absolute Manage to install software at the login window.
declare -r AMSERVER="AM.nowhere.com"
declare -r AMDIR="/Library/Application Support/LANrev Agent"
declare -r AMAGENT="$AMDIR/LANrev Agent.app/Contents/MacOS/LANrev Agent"
declare -r LOGFILE="/var/log/gov.nih.nimh.onset.log"
#!/usr/bin/python
# handbrake_convert.py
# Author: Patrick Gallagher
# Purpose: Use HandBrakeCLI to convert media files to mp4
#
# https://handbrake.fr/docs/en/latest/cli/cli-guide.html
# https://handbrake.fr/downloads2.php
import os
import time
#!/bin/bash
# checkUsersWithoutSecureToken.sh
#
# Purpose: Determines which users do not have a Secure Token on High Sierra
# This tells us which users will not be able to add other users via sysadminctl.
#
# Written by: Patrick Gallagher
OSvers=$( sw_vers -productVersion | cut -d. -f2 )
# Check if this is a pairing Workstation
#!/bin/bash
# check_root_shell.sh
shell="$(/usr/bin/dscl . -read /Users/root UserShell)"
if [[ "$shell" == *"false"* ]]; then
echo "<result>Yes</result>"
else
echo "<result>No</result>"
#!/bin/bash
###
#
# Name: ec_checkLDAPmatch_EA.sh
# Description: Checks if local user name matches what is authenticated in EC
# Author: Patrick Gallagher
# Created: 2018-02-16
#
###
if [[ -d "/Applications/Enterprise Connect.app" ]]; then