diff --git a/README.md b/README.md index 694cf64..e056f9a 100644 --- a/README.md +++ b/README.md @@ -179,37 +179,38 @@ point at the form configuration JSON file you'd like to use. Usage: - Usage: ./scriptform.py [option] (--start|--stop) - ./scriptform.py --generate-pw + Usage: /usr/bin/scriptform [option] (--start|--stop) + /usr/bin/scriptform --generate-pw Options: + --version show program's version number and exit -h, --help show this help message and exit -g, --generate-pw Generate password - -p PORT, --port=PORT Port to listen on + -p PORT, --port=PORT Port to listen on (default=80) -f, --foreground Run in foreground (debugging) + -r, --reload Reload form config on every request (DEV) --pid-file=PID_FILE Pid file --log-file=LOG_FILE Log file --start Start daemon --stop Stop daemon - ScriptForm can run both in daemon mode or in the foreground. In daemon mode, we can control ScriptForm with the `--start` and `--stop` options. By default it runs on port 80, which we can change with the `-p` option. - $ ./scriptform -p8081 ./test_server.json + $ scriptform -p8081 ./test_server.json This puts ScriptForm in the background as a daemon. It creates a PID file and a log file. - $ tail scriptform.py.log + $ tail scriptform.log 2015-04-08 07:57:27,160:DAEMON:INFO:Starting 2015-04-08 07:57:27,161:DAEMON:INFO:PID = 5614 2015-04-08 07:57:27,162:SCRIPTFORM:INFO:Listening on 0.0.0.0:8081 In order to stop the daemon: - $ ./scriptform --stop + $ scriptform --stop We can control the location of the PID file and log file with the `--pid-file` and `--log-file` options. If we don't specify these, ScriptForm will create @@ -220,7 +221,7 @@ To run ScriptForm in the foreground, specify the `-f` option. If you're going to use basic authentication, you can generate a password for your user with the `--generate-pw` option: - $ ./scriptform.py --generate-pw + $ scriptform --generate-pw Password: Repeat password: 2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae diff --git a/doc/MANUAL.md b/doc/MANUAL.md index 6d695d5..e9a8883 100644 --- a/doc/MANUAL.md +++ b/doc/MANUAL.md @@ -1194,11 +1194,16 @@ Passwords are unsalted SHA256 hashed passwords. To generate one, you can use the `--generate-pw` option of Scriptform. This will ask you twice for a plaintext password and return the hash that can be used in the `users` element. - $ ./scriptform.py --generate-pw + $ scriptform --generate-pw Password: Repeat password: ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad +**Note** that if you're running from the repository, you'll have to run +Scriptform as: + + $ src/scriptform.py --generate-pw + ### Form limiting You may specify a `allowed_users` field in a form definition. Only user names