macOS: add launchd sample plist

This commit is contained in:
Nicola Murino 2019-09-10 08:03:53 +02:00
parent e2e122169d
commit 7010f513e3
2 changed files with 29 additions and 1 deletions

View file

@ -67,12 +67,14 @@ sftpgo -v
SFTPGo version: 0.9.0-dev-90607d4-dirty-2019-08-08T19:28:36Z 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: Alternately you can use distro packages:
- Arch Linux PKGBUILD is available on [AUR](https://aur.archlinux.org/packages/sftpgo/ "SFTPGo") - 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 ## Configuration
The `sftpgo` executable can be used this way: The `sftpgo` executable can be used this way:

View file

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.github.drakkan.sftpgo</string>
<key>EnvironmentVariables</key>
<dict>
<key>SFTPGO_CONFIG_DIR</key>
<string>/usr/local/opt/sftpgo/etc</string>
<key>SFTPGO_LOG_FILE_PATH</key>
<string>/usr/local/opt/sftpgo/log/sftpgo.log</string>
</dict>
<key>WorkingDirectory</key>
<string>/usr/local/opt/sftpgo/etc</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/opt/sftpgo/bin/sftpgo</string>
<string>serve</string>
</array>
<key>KeepAlive</key>
<true/>
<key>ThrottleInterval</key>
<integer>10</integer>
</dict>
</plist>