From b39db0fcd4f7573645c30d1d68fb953dac48131b Mon Sep 17 00:00:00 2001 From: Jonathan Dahan Date: Wed, 23 Aug 2023 13:14:32 -0400 Subject: [PATCH] Make launchd service for macOS --- README.md | 8 ++++++++ contrib/libreddit.plist | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 contrib/libreddit.plist diff --git a/README.md b/README.md index fd24283..76b6481 100644 --- a/README.md +++ b/README.md @@ -286,6 +286,14 @@ guarantee nginx waits for this service to start. Edit Before=nginx.service ``` +## launchd + +If you are on macOS, you can use the launchd service available in `contrib/libreddit.plist`. + +Install it with `cp contrib/libreddit.plist ~/Library/LaunchAgents/`. + +Load and start it with `launchctl load ~/Library/LaunchAgents/libreddit.plist`. + ## Building ``` diff --git a/contrib/libreddit.plist b/contrib/libreddit.plist new file mode 100644 index 0000000..f88a034 --- /dev/null +++ b/contrib/libreddit.plist @@ -0,0 +1,19 @@ + + + + + Label + libreddit + + Program + libreddit + + KeepAlive + + + RunAtLoad + + + + +