From 7010f513e3de17df70a3ff342ad7ded3f5964ad9 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Tue, 10 Sep 2019 08:03:53 +0200 Subject: [PATCH] macOS: add launchd sample plist --- README.md | 4 +++- init/com.github.drakkan.sftpgo.plist | 26 ++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 init/com.github.drakkan.sftpgo.plist diff --git a/README.md b/README.md index e64b27aa..d5b3818e 100644 --- a/README.md +++ b/README.md @@ -67,12 +67,14 @@ sftpgo -v SFTPGo version: 0.9.0-dev-90607d4-dirty-2019-08-08T19:28:36Z ``` -For Linux, a systemd sample [service](https://github.com/drakkan/sftpgo/tree/master/init/sftpgo.service "systemd service") can be found inside the source tree. +For Linux, a `systemd` sample [service](https://github.com/drakkan/sftpgo/tree/master/init/sftpgo.service "systemd service") can be found inside the source tree. Alternately you can use distro packages: - Arch Linux PKGBUILD is available on [AUR](https://aur.archlinux.org/packages/sftpgo/ "SFTPGo") +For macOS a `launchd` sample [service](https://github.com/drakkan/sftpgo/tree/master/init/com.github.drakkan.sftpgo.plist "launchd plist") can be found inside the source tree. The `launchd` plist assumes that `sftpgo` has `/usr/local/opt/sftpgo` as base directory. + ## Configuration The `sftpgo` executable can be used this way: diff --git a/init/com.github.drakkan.sftpgo.plist b/init/com.github.drakkan.sftpgo.plist new file mode 100644 index 00000000..72d6893d --- /dev/null +++ b/init/com.github.drakkan.sftpgo.plist @@ -0,0 +1,26 @@ + + + + + Label + com.github.drakkan.sftpgo + EnvironmentVariables + + SFTPGO_CONFIG_DIR + /usr/local/opt/sftpgo/etc + SFTPGO_LOG_FILE_PATH + /usr/local/opt/sftpgo/log/sftpgo.log + + WorkingDirectory + /usr/local/opt/sftpgo/etc + ProgramArguments + + /usr/local/opt/sftpgo/bin/sftpgo + serve + + KeepAlive + + ThrottleInterval + 10 + + \ No newline at end of file