Skip to content

Mockup project containing experiments with packaging and installing jobs on macOS

Notifications You must be signed in to change notification settings

diavoletto76/mockup-macos-pkg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Creating and installing .pkg packages on macOS

Mockup project containing experiments with packaging and installing custom jobs or deamons on macOS. Tasks are performed with standard macOS tools: pkgbuild and installer.

Usage

Build and install a mockup job which runs every minute and prints a timestamp in a log file.

make build
make install

Build a script-only (no payload) package which can be used to unload the LaunchDaemon and uninstall the job script and corresponding files (logs ecc.)

make build-uninstal
make uninstall

Compatibility

These tools are expeted to work fine on macOS 11.x.

Usefull commands

Load/unload LaunchDaemon job

Bootstraps a service or directory of services and respectively unloads a service or directory of services.

launchctl load /Library/LaunchDaemons/d76.mockup-job.plist
launchctl unload /Library/LaunchDaemons/d76.mockup-job.plist

Forget an installed package

Discard receipt data for the specified package.

pkgutil --forget d76.mockup-job

Force the execution of job/deamon

sudo launchctl kickstart system/d76.mockup-job

Resources

Manual pages

  • man pkgbuild
  • man installer
  • man pkgutil
  • man launchctl

Links

About

Mockup project containing experiments with packaging and installing jobs on macOS

Topics

Resources

Stars

Watchers

Forks