I tried using Whitebox's Packages to create an installer for a LaunchDaemon. The daemon calls a shell script, which itself sources a configuration file.
So what I would like is an installer which installs:
- /Library/LaunchDaemons/my_daemon.plist. (This is not a problem).
- /usr/local/bin/myscript.sh
- /usr/local/etc/myscript.conf
I cannot find how to specify the destination path of /usr/local.
Packages doesn't let me edit the destination of these 2 files, and seems to want to install to "./myscript.sh" and "./myscript.conf", even though it did let me define the absolute destination for the .plist file in /Library/LaunchDaemons.
I guess I could write a postinstall script which creates the directories if needed and copies the files there. But isn't there a better/simpler solution which I am overlooking?
In other words, how can I create a .pkg installer which lets me specify absolute directories for some files, and which creates these directories during the install if needed.
Is a postinstall shell script the only solution, or is there a way to have Packages do things automatically, or is there some other package-creation app which would be more practical for this?