Merge pull request #258 from AHOHNMYC/readme-service-edit

More detail and secure service example
This commit is contained in:
Sergey Arkhipov
2022-03-14 09:37:45 +03:00
committed by GitHub
+4 -1
View File
@@ -317,12 +317,15 @@ Now you can create a systemd unit:
```console ```console
$ cat /etc/systemd/system/mtg.service $ cat /etc/systemd/system/mtg.service
[Unit] [Unit]
Description=mtg Description=mtg - MTProto proxy server
Documentation=https://github.com/9seconds/mtg
After=network.target
[Service] [Service]
ExecStart=/usr/local/bin/mtg run /etc/mtg.toml ExecStart=/usr/local/bin/mtg run /etc/mtg.toml
Restart=always Restart=always
RestartSec=3 RestartSec=3
DynamicUser=true
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target