Skip to content

Instantly share code, notes, and snippets.

@calum-github
calum-github / gist:9152985ab2b4dce96f7a
Created April 24, 2015 05:52
This script disables the firewall and SELinux
#!/bin/bash
echo "*** Stopping and disabling Firewalld ***"
systemctl stop firewalld && systemctl disable firewalld
echo "*** Firewalld: Disabled ***"
echo "*** Disabling SELinux ***"
sed -i -e 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
echo "*** SELinux: Disabled ***"
echo ""
echo "Ready to reboot? (y/n)"
@calum-github
calum-github / gist:15b4739c85ccf7813d82
Last active August 29, 2015 14:19
This script sets up a centos7 server as a linux netboot server
#!/bin/bash
# Set some variables
samba_user_name="smbuser"
samba_user_password="password"
# This will attempt to get the IP address for the server. YMMV with this, if in doubt, hardcode the IP address of your server here.
my_ip_address=`ip addr | grep "en" | awk '/inet/ {print $2}' | cut -d "/" -f1`
# Install some packages
echo "Installing Packages"
-=- Starting new BSDP server session -=-
05/04/2015 12:48:06 AM - DEBUG: Considering NBI source at /nbi/DEC_NetBoot_14C109_v2.nbi
05/04/2015 12:48:06 AM - DEBUG: [========= Using the following boot images =========]
05/04/2015 12:48:06 AM - DEBUG: /nbi/DEC_NetBoot_14C109_v2.nbi
05/04/2015 12:48:06 AM - DEBUG: [========= End boot image listing =========]
05/04/2015 01:00:00 AM - DEBUG: -=========================================-
05/04/2015 01:00:00 AM - DEBUG: Got BSDP INFORM[LIST] packet:
05/04/2015 01:00:00 AM - DEBUG: Determining image list for system ID Macmini6,2
05/04/2015 01:00:00 AM - DEBUG: Found enabled system ID Macmini6,2 - adding "Mac OS 10.10.2 (14C109) Created by, Calum Hunter on: Wednesday, 25 February 2015." to list
[root@munki nbi]# docker logs -f bsdpy
+ tail -f /var/log/bsdpserver.log
+ /usr/bin/env python /bsdpy/bsdpserver.py
File "/bsdpy/bsdpserver.py", line 1077
logging.debug'\n-=============================[-> BSDP SELECT <-]=======================================-')
^
SyntaxError: invalid syntax
+ tail -f /var/log/bsdpserver.log
+ /usr/bin/env python /bsdpy/bsdpserver.py
File "/bsdpy/bsdpserver.py", line 1077
May 15 11:21:45 c8e0eb2f5cfdM LoginScriptPlugin[656]: / is group writable
May 15 11:21:45 c8e0eb2f5cfdM LoginScriptPlugin[656]: Not executing /Library/Application Support/LoginScriptPlugin/postmount-user-lpadmin_check.s
@calum-github
calum-github / site_info.sh
Created June 22, 2015 02:00
Site Info script
#!/bin/bash
#####################################################################
# #
# Author: Calum Hunter #
# Date: 17-10-2014 #
# Version 0.1 #
# Purpose: Script to capture the site #
# and send this to our Munki Report server #
# #
@calum-github
calum-github / app_store_configuration.mobileconfig
Created July 30, 2015 03:21
Profile to prevent app adoption notification in AppStore
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadType</key>
<string>com.apple.appstore</string>
<key>PayloadVersion</key>
@calum-github
calum-github / deploy.xml
Last active August 27, 2015 06:09
deployment file for NeoSpeech Voices - Captivate 9
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Deployment>
<Properties>
<Property name="INSTALLDIR">/Applications/Adobe Captivate Voices 9</Property>
<Property name="installLanguage">en_US</Property>
<Property name="installSourcePath">REPLACEME</Property>
</Properties>
<Payloads>
<!-- Adobe Captivate Voices 9 -->
<Payload adobeCode="{BBCD0XXX-XXXX-XXXX-XXXX-XXXXXX8214}">
@calum-github
calum-github / deploy.xml
Last active August 27, 2015 06:09
deployment xml for elearning assets for captivate 9
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Deployment>
<Properties>
<Property name="INSTALLDIR">/Users/Shared/Adobe/eLearning Assets/Characters_9_0</Property>
<Property name="installLanguage">en_US</Property>
<Property name="installSourcePath">REPLACEME</Property>
</Properties>
<Payloads>
<!-- Adobe eLearning Assets All -->
<Payload adobeCode="{0688EA01-XXXX-XXXX-XXXX-XXXXXXX418}">
@calum-github
calum-github / postinstall.sh
Last active August 27, 2015 07:11
postinstall for captivate 9 package
#!/bin/bash
###########################################################################
# Postinstall script to install Adobe Captivate 9 an addtional components #
# Author: Calum Hunter #
# Date: 27-08-2015 #
# Version: 1.0 #
###########################################################################
# Set current directory name