|
| 1 | +# -*- Org -*- |
| 2 | + |
| 3 | +#+title: Command Line Interface |
| 4 | +#+include: ./common-config.org |
| 5 | + |
| 6 | +The freehttpd command-line interface is designed to keep the workflow simple, and |
| 7 | +steady. There's also a man page for ~freehttpd(8)~, you could check that instead |
| 8 | +if you wish. |
| 9 | + |
| 10 | +* Command-line Usage |
| 11 | + |
| 12 | +#+begin_src shell |
| 13 | + freehttpd [-f file] [-h] [-v] [-V] [-T] [-d] |
| 14 | +#+end_src |
| 15 | + |
| 16 | +* Available Options |
| 17 | + |
| 18 | +| Option | Description | |
| 19 | +|-----------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------| |
| 20 | +| ~-f~, ~--config=FILE~ | Path to the config file to read. The default value is set during build configuration. | |
| 21 | +| ~-h~, ~--help~ | Show basic help and usage information. | |
| 22 | +| ~-v~, ~--verbose~ | Enable verbose mode. Please note that this option does not have any change in its effect when used multiple times, unlike some programs that behave like this. | |
| 23 | +| ~-V~, ~--version~ | Print version information and exit. | |
| 24 | +| ~-T~, ~--test~ | Test the configuration files for correctness of syntax and values, then exit with code 0 if successful. Otherwise, error messages will be printed. | |
| 25 | +| ~-d~, ~--detach~ | Run in detached mode, a.k.a. daemon mode. When using with systemd, this is not necessary, as systemd recommends staying in foreground mode. | |
| 26 | + |
| 27 | +* Daemon management |
| 28 | + |
| 29 | +If you have a service/daemon manager installed, and have configured freehttpd during |
| 30 | +build time with such support, you should rely on that specific service manager to |
| 31 | +manage freehttpd instead of starting it manually. For example, if you have enabled |
| 32 | +support for systemd during build, a systemd service unit file should have been installed |
| 33 | +to the appropriate destination. As such, you should be able to run: |
| 34 | + |
| 35 | +#+begin_src shell |
| 36 | + systemctl start freehttpd.service |
| 37 | +#+end_src |
| 38 | + |
| 39 | +And all other standard ~systemctl~ commands should work as intended. If you're using |
| 40 | +SysVinit, OpenRC, or some other service manager, you might need to manually create a |
| 41 | +service for freehttpd unless we support it. In both cases, the workflow is pretty much |
| 42 | +the same. |
0 commit comments