Installation


Auto Munki Importer Installation

Auto Munki Importer ships as a standard Apple Installer Package. Download it from here, and then install it like any normal installer package (you will need to enter an administrators username and password.)

What is installed?

/usr/local/autoMunkiImporter/*
The autoMunkiImporter.pl script and other required items are installed into this directory.

/Library/​Application Support/​autoMunkiImporter/*
This directory holds example data files that are installed by default. The examples are installed into /Library/​Application Support/​autoMunkiImporter/_example_plists/* and then copied into the parent directory if they don't already exist (Auto Munki Importer ignores _example_plists by default). It needs to be writable by the user that the script is run by.

/Library/​Logs/​autoMunkiImporter/*
This directory holds is the default location for log and status summary files. It needs to be writable by the user that the script is run by.

/private/​etc/​paths.d/​autoMunkiImporter
This file adds /usr/local/autoMunkiImporter/* to the users path, so that you can just run autoMunkiImporter.pl without needing to specify the entire path.

/usr/​local/​share/​man/​man1/​autoMunkiImporter.pl.1
The man page for Auto Munki Importer.


Dependencies

For Auto Munki Importer to run, a number of third party perl modules are required.

Install Xcode Command Line Tools

The Xcode Command Line Tools can be installed from within Xcode (dowloaded for either the App Store or the Developer Site), or as a separate download from Apple's Developer Site (which requires a free developer account, but removes the need for a complete Xcode install - this is the method I use).

From the developer site, find the latest version of the tools that matches your operating system, download and then install them (standard Apple Installer Package).

Perl Modules

Auto Munki Importer utilises a number of third party Perl modules to enable the required functionality. Installation of these modules requires compilers and other tools included in the Xcode Command Line tools package. These need to be installed before the script will work.

Auto Munki Importer has the ability to install the required modules. It uses App::cpanminus which is a dependency free, zero configuration script that can get, unpack, build and install modules from the Comprehensive Perl Archive Network (CPAN). It installs the modules at the system level, so you will need to provide your password during the installation.

The installer package installs the required dependencies (Date::Parse, Mail::Mailer, URI::Escape, URI::URL, WWW:Mechanize) during postflight, however you can re-run the dependency install at any time by running autoMunkiImporter.pl --install-dependencies if required.


Remove Auto Munki Importer

Pending you haven't changed any of the default locations, the following commands will remove all items installed by the installer package (except for the Perl dependencies), or created during normal operation of the script.

rm -r /Library/Application\ Support/autoMunkiImporter
rm -r /Library/Logs/autoMunkiImporter
sudo rm -r /usr/local/autoMunkiImporter
sudo rm /usr/local/share/man/man1/autoMunkiImporter.pl.1
sudo rm /private/etc/paths.d/autoMunkiImporter
sudo launchctl unload /Library/LaunchDaemons/com.github.neographophobic.autoMunkiImporter.plist
sudo rm /Library/LaunchDaemons/com.github.neographophobic.autoMunkiImporter.plist
sudo pkgutil --forget com.github.neographophobic.pkg.AutoMunkiImporter