This commit is contained in:
TheK4n 2021-09-18 22:46:22 +03:00
parent 9642a25e49
commit b75292fac9

View File

@ -66,8 +66,42 @@ sftp host_name
|:------------------: | :------------------------------------ | |:------------------: | :------------------------------------ |
|```Ctrl + [``` | Analog Esc | |```Ctrl + [``` | Analog Esc |
|```d -> Ctrl + End``` | Delete from cursor to end of file | |```d -> Ctrl + End``` | Delete from cursor to end of file |
| ```u``` | Cancel last command | | ```u``` | Undo |
| ```Ctrl + r``` | Cancel cancel | | ```Ctrl + r``` | Redo |
| ```22G``` | Go to line 22 | | ```22G``` | Go to line 22
|
### Autostart
```bash
sudo vim /etc/systemd/system/<your_bot_name>.service
sudo systemctl daemon-reload
sudo systemctl start <your_bot_name>.service
sudo systemctl status <your_bot_name>.service
sudo systemctl enable <your_bot_name>.service
```
**"/etc/systemd/system/<your_bot_name>.service"**
```text
[Unit]
Description=<DESCRIPTION>
After=network.target
[Service]
Type=simple
User=<username>
ExecStart=<full_path_to_executor> <full_path_to_script>
ExecReload=<full_path_to_executor> <full_path_to_script>
WorkingDirectory=<full_path_to_bot>
KillMode=process
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
```
<h1 align="center"><a href="#top"></a></h1> <h1 align="center"><a href="#top"></a></h1>