I have a config file app.ini
(the background is gitea, but that is not important)
[log]
MODE = file
LEVEL = info
[server]
SSH_DOMAIN = localhost
DOMAIN = localhost
HTTP_PORT = 3000
[mailer]
ENABLED = false
I would like to add multiple lines at the end of the [server]
block via a bash command (without open and edit app.ini). How to add something to the end is clear (echo "xyz" >> app.ini
).
The result should be something like:
[log]
MODE = file
LEVEL = info
[server]
SSH_DOMAIN = localhost
DOMAIN = localhost
HTTP_PORT = 3000
PROTOCOL = https
CERT_FILE = cert.pem
KEY_FILE = key.pem
[mailer]
ENABLED = false
Adding the new lines below [server]
is also fine:
[server]
PROTOCOL = https
CERT_FILE = cert.pem
KEY_FILE = key.pem
...
Thanks in advance.