linux:services:systemd
Создание кастомного сервиса
Создать файл в директории /lib/systemd/system/
с названием сервиса custom-name.service
В файле записать:
[Unit] Description=custom-name Wants=network-online.target After=network.target network-online.target [Service] User=user_name Group=user_name WorkingDirectory=/path/to/service/custom-name ExecStart=/path/to/service/custom-name.sh KillMode=process SyslogIdentifier=custom-name SyslogFacility=daemon Restart=on-failure RestartSec=5s [Install] WantedBy=multi-user.target
Далее
systemctl enable custom-name.service systemctl restart custom-name.service
linux/services/systemd.txt · Последнее изменение: — admin