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

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
управление_сервисами_в_linux [2025/04/18 15:37]
val [Управление юнитами Systemd]
управление_сервисами_в_linux [2025/08/09 17:11] (current)
val
Line 153: Line 153:
   * [[https://​wiki.archlinux.org/​index.php/​systemd|systemd]]   * [[https://​wiki.archlinux.org/​index.php/​systemd|systemd]]
  
-==== Управление юнитами Systemd ​=====+==== Управление юнитами Systemd ====
  
   * [[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]]
Line 204: Line 204:
 </​code>​ </​code>​
  
-==== Настройка параметров запуска в Systemd ​=====+==== Настройка параметров запуска в Systemd ====
  
 <​code>​ <​code>​
Line 223: Line 223:
 # cat /​proc/​NNNNN/​limits # cat /​proc/​NNNNN/​limits
 </​code>​ </​code>​
 +
 +==== Systemd Sockets ====
 +
 +  * [[https://​gist.github.com/​drmalex07/​28de61c95b8ba7e5017c|README-setup-socket-activated-systemd-service.md]]
 +
 +<​code>​
 +# cat /​etc/​systemd/​system/​webd.socket
 +</​code><​code>​
 +[Unit]
 +Description=Web Socket
 +
 +[Socket]
 +ListenStream=127.0.0.1:​9999
 +Accept=yes
 +
 +[Install]
 +WantedBy=sockets.target
 +</​code><​code>​
 +# cat /​etc/​systemd/​system/​webd@.service
 +</​code><​code>​
 +[Unit]
 +Description=WebD Service
 +Requires=webd.socket
 +
 +[Service]
 +Type=simple
 +ExecStart=/​usr/​local/​sbin/​webd %i
 +StandardInput=socket
 +StandardError=journal
 +TimeoutStopSec=5
 +#​RuntimeMaxSec=10
 +
 +[Install]
 +WantedBy=multi-user.target
 +</​code><​code>​
 +# systemctl start webd.socket
 +
 +# curl 127.0.0.1:​9999
 +
 +# journalctl -u '​webd@*'​ -n 20 --no-pager
 +</​code>​
 +
 ===== Система загрузки OpenRC ===== ===== Система загрузки OpenRC =====
  
управление_сервисами_в_linux.1744979855.txt.gz · Last modified: 2025/04/18 15:37 by val