More detail and secure service example

This commit is contained in:
AHOHNMYC
2022-03-13 04:52:56 +03:00
committed by GitHub
parent 6da9c2e58d
commit 2ae0101d18
+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