Skip to content

Commit c3b0554

Browse files
doc: add command line guide
Signed-off-by: Ar Rakin <rakinar2@onesoftnet.eu.org>
1 parent b7cee5f commit c3b0554

2 files changed

Lines changed: 45 additions & 1 deletion

File tree

doc/command-line.org

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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.

doc/index.org

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
#+include: ./common-config.org
55
#+options: toc:nil
66

7-
+ [[file:index.org#introduction][1 Introduction]]
7+
+ [[file:licensing.org][1 Introduction]]
88
- [[file:licensing.org][1.1 Licensing (AGPL)]]
99
- [[file:gfdl.org][1.2 GNU Free Documenation License v1.3]]
1010
- [[file:getting-started.org][1.3 Getting started]]
11+
+ [[file:command-line.org][2 Invoking freehttpd]]
12+
- [[file:command-line.org][2.1 Command Line Interface]]

0 commit comments

Comments
 (0)