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
управление_сервисами_в_linux [2023/02/20 08:00]
val [Управление юнитами Systemd]
управление_сервисами_в_linux [2024/09/06 12:39] (current)
val [Управление юнитами Systemd]
Line 36: Line 36:
 #!/bin/sh #!/bin/sh
  
-/​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 &
  
 exit 0 exit 0
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 152: Line 152:
  
   * [[https://​docs.gitea.io/​en-us/​linux-service/​|Run Gitea as Linux service]]   * [[https://​docs.gitea.io/​en-us/​linux-service/​|Run Gitea as Linux service]]
 +  * Сервис SNORT [[Сервис SNORT#​Копирование alert_unified2 в syslog]]
  
 <​code>​ <​code>​
Line 178: Line 179:
  
 [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 
 +#​ExecStart=/​usr/​bin/​java -jar /​home/​jenkins/​agent.jar -url http://​server.corp13.un:​8081/​ -secret NNNNNNNNNNNNNNNNNNNN -name gate -workDir "/​home/​jenkins/"​ 
 +#​User=jenkins
 KillMode=process KillMode=process
-Restart=on-failure+Restart=always
 RestartSec=42s RestartSec=42s
  
управление_сервисами_в_linux.1676869245.txt.gz · Last modified: 2023/02/20 08:00 by val