Files
go-service/debian/gpio-monitor-server.service

40 lines
840 B
Desktop File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[Unit]
Description=GPIO Monitor Server
After=network.target
Wants=network.target
[Service]
Type=simple
User=gpio-monitor
Group=gpio-monitor
WorkingDirectory=/opt/gpio-monitoring
# Запуск сервера с параметрами
ExecStart=/usr/bin/gpio-monitor-server \
-pipe /tmp/gpio_pipe \
-retention-hours=72 \
-retention-mb=2000 \
-retention-interval=60 \
-rotation-check-interval=1 \
-buffer-size=10240 \
-human-log-interval=5
# Перезапуск при падении
Restart=on-failure
RestartSec=10s
# Лимиты и безопасность
LimitNOFILE=4096
NoNewPrivileges=yes
# Логирование
StandardOutput=journal
StandardError=journal
SyslogIdentifier=gpio-monitor
# Настройки для доступа к GPIO
AmbientCapabilities=CAP_SYS_RAWIO
[Install]
WantedBy=multi-user.target