User Tools

Site Tools


управление_сервисами_в_linux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
управление_сервисами_в_linux [2022/02/27 08:19]
val
управление_сервисами_в_linux [2023/06/01 13:55]
val [Скрипты запуска/остановки]
Line 84: Line 84:
 then then
         echo Starting sshvpn...         echo Starting sshvpn...
-        /​usr/​bin/​ssh -N -R 200X:​localhost:​22 userX@gate.isp.un &+        /​usr/​bin/​ssh -N -R 61000+X:​localhost:​22 ​-o ServerAliveInterval=60 -o ExitOnForwardFailure=yes ​userX@gate.isp.un &
         echo $! > /​var/​run/​sshvpn.pid         echo $! > /​var/​run/​sshvpn.pid
 elif [ "​$1"​ = stop ] elif [ "​$1"​ = stop ]
Line 150: Line 150:
  
 ==== Управление юнитами Systemd ===== ==== Управление юнитами Systemd =====
 +
 +  * [[https://​docs.gitea.io/​en-us/​linux-service/​|Run Gitea as Linux service]]
  
 <​code>​ <​code>​
Line 176: Line 178:
  
 [Service] [Service]
-ExecStart=/​usr/​bin/​ssh -N -R 200X:​localhost:​22 userX@gate.isp.un+ExecStart=/​usr/​bin/​ssh -N -R 61000+X:​localhost:​22 ​-o ServerAliveInterval=60 -o ExitOnForwardFailure=yes ​userX@gate.isp.un
 KillMode=process KillMode=process
-Restart=on-failure+Restart=always
 RestartSec=42s RestartSec=42s
  
Line 198: Line 200:
 [Service] [Service]
 LimitNOFILE=65536 ​     # nginx  LimitNOFILE=65536 ​     # nginx 
-LimitNOFILESoft=65536 ​ # nginx 
 TimeoutStartSec=180 ​   # elasticsearch TimeoutStartSec=180 ​   # elasticsearch
 </​code><​code>​ </​code><​code>​
-# systemctl daemon-reload+# systemctl daemon-reload ​    # не очевидно,​ что нужно 
 + 
 +# systemctl show имясервиса
  
 # systemctl restart имясервиса # systemctl restart имясервиса
управление_сервисами_в_linux.txt · Last modified: 2023/06/01 13:55 by val