View sudoaudit.sh
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 | |
# Name: sudoaudit | |
# Author: Adam Whitlock | |
# Version: 0.1 | |
# Purpose: Send e-mail when sudo is invoked by a user | |
# | |
# Note: Please setup the following parameters in /etc/sudoers: | |
# mailto: "auditemailaddress@companyname.com” | |
# mail_always: on |
View retrievetoken.scpt
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
on run {input, parameters} | |
tell application "System Events" | |
set frontApp to first application process whose frontmost is true | |
set frontAppName to name of frontApp | |
end tell | |
tell application "SecurID" | |
activate |
View rsatoken.scpt
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
-- These are two separate Applescripts that can be executed within an automator workflow. Create a new workflow, create two “run applescript” actions, and paste them. This script will copy the RSA token, set your PIN, and paste it. If you don’t want the pin copied, remove the two lines with “pin” in the second applescript. There are instructions online about setting workflows as services which can be called via key commands. | |
-- You can set the “terminalapp” to whichever app you use (I use iTerm) and the “pin” to your PIN. | |
on run {input, parameters} | |
set terminalapp to "iTerm" | |
set pin to "6666" | |
View faildetect.sh
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 | |
# | |
#Name: Fail Detection | |
#Function: If the previously executed command fails the script will exit. | |
function failDetect () { | |
if [ $? -eq 0 ]; then | |
echo -e "Something went horribly wrong... exiting script." | |
exit 2 | |
fi |
View mongodb_json_curl.conf
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
## Load curl_json plugin | |
LoadPlugin curl_json | |
<Plugin curl_json> | |
<URL "http://localhost:28017/serverStatus?text=1"> | |
Instance "mongodb" | |
## Specify JSON array keys to collect information | |
NewerOlder