Build a package to deploy CrankD
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

buildCrankPkg is a script that will build an Apple package that contains everything you need to use crankd on your clients.



I recommend reading my blog post on the different parts that make up this package to get a deeper understanding. You need to copy a few items into the provided directories before running the script.


You should put your actual python script in here. In the example post linked above, this would be The contents of this directory will be installed to /Library/Application Support/crankd.


If you want to use your own LaunchDaemon, you should put it here. One has been provided that should cover most use cases. The files here will be installed to /Library/LaunchDaemons.


Shockingly, this is where you should put your preference file that will tell crankd what to run. An example to run the script is in the blog post above.


The script takes a few options you can pass to it.

--repopath: This should be a file path to a clone of the PyMacAdmin repository that already exists on disk. You should use this is you've made customisations to crankd that only exist on your Mac. Optional.

--remoterepo: The address of a git repository that isn't the default. This is only used if --repopath isn't specified.

If neither --remoterepo nor --repopath are passed, the main repository will be used.

--version: The version number of the package you're building. Defaults to 1.0 if not specified.

--identifier: The identifier of the package. Defaults to com.grahamgilbert.crankd

Building the package

Once all your files are in place, simply call the script using sudo.

cd ~/src/CrankPkg
sudo ./  --version 2.1 --identifier com.example.crankd

Using a local repository located at ~/src/PyMacAdmin:

cd ~/src/CrankPkg
sudo ./ --repopath ~/src/PyMacAdmin --version 2.1 --identifier com.example.crankd

Using a remote repository located at

cd ~/src/CrankPkg
sudo ./ --remoterepo --version 2.1 --identifier com.example.crankd