From 45a13f5f4ecb7e1bbd1183c98ed5c249ea45cc6a Mon Sep 17 00:00:00 2001 From: thomsh Date: Fri, 31 Jan 2020 03:20:29 +0000 Subject: [PATCH] Update README add section for dataprovider init --- .gitignore | 3 +++ README.md | 13 +++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..f61b3864 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# compilation output +sftpgo +sftpgo.exe diff --git a/README.md b/README.md index 52c14c6e..7347a0fd 100644 --- a/README.md +++ b/README.md @@ -126,10 +126,6 @@ The `serve` subcommand supports the following flags: If you don't configure any private host keys, the daemon will use `id_rsa` in the configuration directory. If that file doesn't exist, the daemon will attempt to autogenerate it (if the user that executes SFTPGo has write access to the config-dir). The server supports any private key format supported by [`crypto/ssh`](https://github.com/golang/crypto/blob/master/ssh/keys.go#L32). -Before starting `sftpgo` a dataprovider must be configured. - -SQL scripts to create the required database structure can be found inside the source tree [sql](./sql "sql") directory. The SQL scripts filename is, by convention, the date as `YYYYMMDD` and the suffix `.sql`. You need to apply all the SQL scripts for your database ordered by name, for example `20190828.sql` must be applied before `20191112.sql` and so on. - The `sftpgo` configuration file contains the following sections: - **"sftpd"**, the configuration for the SFTP server @@ -272,6 +268,15 @@ Let's see some examples: Please note that to override configuration options with environment variables a configuration file containing the options to override is required. You can, for example, deploy the default configuration file and then override the options you need to customize using environment variables. +### Data provider initialization + +Before starting `sftpgo serve` a data provider must be configured. + +SQL scripts to create the required database structure can be found inside the source tree [sql](./sql "sql") directory. The SQL scripts filename is, by convention, the date as `YYYYMMDD` and the suffix `.sql`. You need to apply all the SQL scripts for your database ordered by name, for example `20190828.sql` must be applied before `20191112.sql` and so on. +Example for `sqlite`: `find sql/sqlite/ -type f -iname '*.sql' -print |sort -n|xargs cat |sqlite3 sftpgo.db` + +### Starting SFTGo in server mode + To start the SFTP Server with the default values for the command line flags simply use: ```