Coder Social home page Coder Social logo

buildcrankpkg's Introduction

buildCrankPkg

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

Usage

Preparation

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.

crankd

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

LaunchDaemons

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.

Preferences

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

Options

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 ./buildCrankPkg.py  --version 2.1 --identifier com.example.crankd

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

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

Using a remote repository located at https://github.com/blah/bahblah.git

cd ~/src/CrankPkg
sudo ./buildCrankPkg.py --remoterepo https://github.com/blah/bahblah.git --version 2.1 --identifier com.example.crankd

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.