36 lines
803 B
Desktop File
36 lines
803 B
Desktop File
[Unit]
|
||
Description=GPIO Monitor Server
|
||
After=network.target
|
||
Wants=network.target
|
||
|
||
[Service]
|
||
Type=simple
|
||
User=user
|
||
Group=user
|
||
WorkingDirectory=/home/user/temp/golang
|
||
|
||
# Запуск сервера с параметрами для 72-часового хранения
|
||
ExecStart=/home/user/temp/golang/build/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
|
||
|
||
[Install]
|
||
WantedBy=multi-user.target |