remove configuration path table + edit README accordingly

This commit is contained in:
xdrm-brackets 2018-11-07 12:41:34 +01:00
parent c787dccfa7
commit 82d694b7cb
2 changed files with 17 additions and 24 deletions

View File

@ -93,12 +93,14 @@ Execute the \<script\> file.
### II. Path Expressions
The syntax is pretty fast-forward, it uses 3 levels to find your configuration line : `[subject.path].[field.path]`.
The syntax is pretty fast-forward, it uses 3 levels to find your configuration line : `[location]@[field.path]`.
| Field | Description | Example |
| --------- | :----------------------------------- | -------------------------- |
| `subject.path` | Dot-separated path to the configuration file to edit. Available program paths are listed in this [table](tablefile). | `sshd`, `httpd`, `nginx`, `nginx.vhost.default` |
| `field.path` | Dot-separated chain of strings that match with a configuration field. If **omitted**, the \<value\> will just be added at the end of the configuration file. In the same way if the field does not point to a raw field but a parent or group containing fields, the \<value\> will be added at the end of the group. | `sshd.AllowGroups`, `nginx.http.gzip` |
| `location` | Path to the configuration file to edit. The file will be created if not found. | `/etc/ssh/sshd_config`, `/etc/nginx/nginx.conf`, `/etc/nginx/sites-available/default` |
| `field.path` | Dot-separated chain of strings that match with a configuration field. If **omitted**, the \<value\> will just be added at the end of the configuration file. In the same way if the field does not point to a raw field but a parent or group containing fields, the \<value\> will be added to the group. | /`etc/ssh/sshd_config@AllowGroups`, `/etc/nginx/nginx.conf@http.gzip` |
> When a file is given as \<content\>, the `cnf` command acts as the shell command `mv` (copy).
@ -126,23 +128,27 @@ _myserver.build_
sys name ubuntu # required to choose which
sys version 18.4 # package-manager to use
[install]
upd
ins nginx ssh sslh
cnf nginx.http.gzip on
cnf nginx.vhost.new-site ./localConfFile
[nginx]
cnf /etc/nginx/nginx.conf@http.gzip on
cnf /etc/nginx/sites-available/new-site ./localConfFile
ser enable nginx
ser start nginx
cnf sshd.PermitRootLogin no
cnf sshd.PermitEmptyPasswords no
cnf sshd.StrictModes yes
cnf sshd.Port 22
[sshd]
cnf /etc/ssh/sshd_config@PermitRootLogin no
cnf /etc/ssh/sshd_config@PermitEmptyPasswords no
cnf /etc/ssh/sshd_config@StrictModes yes
cnf /etc/ssh/sshd_config@Port 22
ser enable sshd
ser enable ssh
cnf sslh.RUN yes
cnf sslh.DEAMON_OPTS "--user sslh --listen 0.0.0.0:443 --ssh 127.0.0.1:22 --ssl 127.0.0.1:44300 --pidfile /var/run/sslh/sslh.pid"
[sslh]
cnf /etc/default/sslh@RUN yes
cnf /etc/default/sslh@DEAMON_OPTS "--user sslh --listen 0.0.0.0:443 --ssh 127.0.0.1:22 --ssl 127.0.0.1:44300 --pidfile /var/run/sslh/sslh.pid"
ser enable sslh
ser start sslh
```

View File

@ -1,13 +0,0 @@
{
"ssh": {
"cnf": { "server": "/etc/sshd_config", "client": "/etc/ssh_config" },
"ser": [ "sshd.service" ]
},
"apache2": {
"cnf": { "main": "/etc/apache2/apache2.conf", "ports": "/etc/apache2/apache2.conf" },
"ser": [ "apache2.service", "httpd.service" ]
}
}