Nicola Murino преди 4 години
родител
ревизия
13d43a2d31
променени са 3 файла, в които са добавени 29 реда и са изтрити 4 реда
  1. 1 0
      README.md
  2. 21 1
      docs/howto/postgresql-s3.md
  3. 7 3
      docs/service.md

+ 1 - 0
README.md

@@ -70,6 +70,7 @@ Some Linux distro packages are available:
   - [sftpgo](https://aur.archlinux.org/packages/sftpgo/). This package follows stable releases. It requires `git`, `gcc` and `go` to build.
   - [sftpgo-bin](https://aur.archlinux.org/packages/sftpgo-bin/). This package follows stable releases downloading the prebuilt linux binary from GitHub. It does not require `git`, `gcc` and `go` to build.
   - [sftpgo-git](https://aur.archlinux.org/packages/sftpgo-git/). This package builds and installs the latest git master. It requires `git`, `gcc` and `go` to build.
+- Deb and RPM packages are built after each commit and for each release.
 
 You can easily test new features selecting a commit from the [Actions](https://github.com/drakkan/sftpgo/actions) page and downloading the matching build artifacts for Linux, macOS or Windows. GitHub stores artifacts for 90 days.
 

+ 21 - 1
docs/howto/postgresql-s3.md

@@ -162,6 +162,26 @@ $ sudo su - sftpgo -s /bin/bash -c 'sftpgo initprovider -c /etc/sftpgo'
 2020-09-12T21:07:50.000 DBG Data provider successfully initialized
 ```
 
+The default sftpgo systemd service will start after the network target, in this setup it is more appropriate to start it after the PostgreSQL service, so override the unit using the following command.
+
+```shell
+sudo systemctl edit sftpgo.service
+```
+
+And override the unit definition with the following snippet.
+
+```shell
+[Unit]
+After=postgresql.service
+```
+
+Confirm that `sftpgo.service` will start after `postgresql.service` with the next command.
+
+```shell
+$ systemctl show sftpgo.service | grep After=
+After=postgresql.service systemd-journald.socket system.slice -.mount systemd-tmpfiles-setup.service network.target sysinit.target basic.target
+```
+
 Next restart the sftpgo service to use the new configuration and check that it is running.
 
 ```shell
@@ -193,4 +213,4 @@ Click `Add` and fill the user details, the minimum required parameters are:
 
 You are done! Now you can connect to you SFTPGo instance using any compatible `sftp` client on port `2022`.
 
-You can mix S3 users with local users but please be aware that we are running the service as the unprivileged `sftpgo` system user so if you set storage as `local` for an SFTPGo virtual user then the home directory for this user need to be owned by the `sftpgo` system user.
+You can mix S3 users with local users but please be aware that we are running the service as the unprivileged `sftpgo` system user so if you set storage as `local` for an SFTPGo virtual user then the home directory for this user must be owned by the `sftpgo` system user. Probably the best choice is to have home directory for local users in paths like `/var/lib/sftpgo/users/<username>`.

+ 7 - 3
docs/service.md

@@ -6,11 +6,15 @@ Run the following instructions from the directory that contains the sftpgo binar
 
 ## Linux
 
-The easiest way to run SFTP as a service on Linux is to download and install the pre-compiled deb/rpm package. This section describes the procedure to use if you prefer to build SFTPGo yourself or if you download a pre-built release as tar.
+The easiest way to run SFTPGo as a service is to download and install the pre-compiled deb/rpm package or use one of the Arch Linux PKGBUILDs we maintain.
 
-For Linux, a `systemd` sample [service](../init/sftpgo.service "systemd service") can be found inside the source tree.
+This section describes the procedure to use if you prefer to build SFTPGo yourself or if you want to download and configure a pre-built release as tar.
 
-Here are some basic instructions to run SFTPGo as service using a dedicated `sftpgo` system account. Please run the following commands from the directory where you downloaded SFTPGo:
+A `systemd` sample [service](../init/sftpgo.service "systemd service") can be found inside the source tree.
+
+Here are some basic instructions to run SFTPGo as service using a dedicated `sftpgo` system account.
+
+Please run the following commands from the directory where you downloaded/compiled SFTPGo:
 
 ```bash
 # create the sftpgo user and group