From 82d694b7cbbdd4edaada821d091a072d97a2ac7b Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Wed, 7 Nov 2018 12:41:34 +0100 Subject: [PATCH] remove configuration path table + edit README accordingly --- README.md | 28 +++++++++++++++++----------- meta/cfg-locations.json | 13 ------------- 2 files changed, 17 insertions(+), 24 deletions(-) delete mode 100644 meta/cfg-locations.json diff --git a/README.md b/README.md index e48e26f..61a153f 100644 --- a/README.md +++ b/README.md @@ -93,12 +93,14 @@ Execute the \ 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 \ 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 \ 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 \ 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 \ will be added to the group. | /`etc/ssh/sshd_config@AllowGroups`, `/etc/nginx/nginx.conf@http.gzip` | + +> When a file is given as \, 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 ``` diff --git a/meta/cfg-locations.json b/meta/cfg-locations.json deleted file mode 100644 index db1b099..0000000 --- a/meta/cfg-locations.json +++ /dev/null @@ -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" ] - } - -} \ No newline at end of file