oetiker / znapzend

zfs backup with remote capabilities and mbuffer integration.
www.znapzend.org
GNU General Public License v3.0
609 stars 137 forks source link

OS X Big Sur fixes (launchd) #555

Closed xenophon61 closed 2 years ago

xenophon61 commented 3 years ago

Hi, and thanks for a great project!

Two issues with a (fresh, current) Big Sur installation, running the latest OpenZFSonOSX. Both easily fixable :-)

Installation error: 'make install' throws a permission error on the /opt/znapzend-0.21.0/ folder

Launchd Daemon error: the default one, created under the 'init' directory (i.e. org.znapzend.plist), copied in the /Library/LaunchDaemons/ folder, does not work; the process exits with an error=78 which corresponds to a launchd 'Function not implemented' error.

The fix for the daemon, is to modify the following: `PATH

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin` should read: ` PATH /usr/local/zfs/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin` ... and the actual command `ProgramArguments /opt/znapzend-0.21.0/bin/org.znapzend ` should be changed to: `ProgramArguments /opt/znapzend-0.21.0/bin/znapzend ` Once again, thanks! With greetings from Athens, Xen
xenophon61 commented 3 years ago

One more thing: the command to send -HUP is as follows:

sudo launchctl kill -HUP system/org.znapzend

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

oetiker commented 2 years ago

@xenophon61 could you provide a PR ?

xenophon61 commented 2 years ago

Sorry for the dumb question, but what is a "PR"?

Ah... A pull request, I guess. Don't know how to do that. I'm a cardiology physician, you see.

Xen

oetiker commented 2 years ago

A Pull Request (PR) is how you can submit changes to the project ... just open the relevant file in github, edit it, and submit ... github will offer guidance.

oetiker commented 2 years ago

Click here: https://github.com/oetiker/znapzend/edit/master/init/org.znapzend.plist.in and edit away

xenophon61 commented 2 years ago

Thanks, it's never too late to get baptized in GitHub. Thanks for the opportunity.

One issue, though:

The program argument I've been using is hard-coded, as follows: <key>ProgramArguments</key> <array> <string>/opt/znapzend-0.21.0/bin/znapzend</string> </array>

I'm not really sure how to adjust it in respect to @BINDIR@ as it appears in org.znapzend.plist.in

TIA

Xen

oetiker commented 2 years ago

In that case, you can add a .in extension to the file, and then add the file to the list of files in configure.ac to be written out at build time ... make sure to modify any mention of the file in Makefile.am if there is any (just not in a position to check it)

You can now use any @xxxx@ tags in the body of the file ... take any Makefile.in as an example.

xenophon61 commented 2 years ago

So many thanks for your time!

I'm kind of hesitant to touch the code, so I'll attempt to modify the ReadMe (and create my first PR of sorts ;-)

I truly appreciate your help, as well as the chance to engage in a GitHub project -- thank you once again!

Can't help but reminisce on my 6502 assembly language coding days ;-)

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.