Все настроено
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
[Unit]
|
||||
Description=Wyoming Event Service with LED control
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
|
||||
# 🔹 Запуск от имени вашего пользователя
|
||||
User=sirmrak
|
||||
Group=sirmrak
|
||||
|
||||
# 🔹 Рабочая директория — где лежит wyoming-led.py
|
||||
WorkingDirectory=/home/sirmrak/projects/Satellite/examples
|
||||
|
||||
# 🔹 Прямой запуск через python из виртуального окружения (без обёрток!)
|
||||
ExecStart=/home/sirmrak/projects/.venv_satellite/bin/python3 /home/sirmrak/projects/Satellite/examples/wyoming-led.py --host 127.0.0.1 --port 10500
|
||||
|
||||
# 🔹 Критически важно: передаём окружение
|
||||
Environment="HOME=/home/sirmrak"
|
||||
Environment="USER=sirmrak"
|
||||
Environment="PATH=/home/sirmrak/projects/.venv_satellite/bin:/usr/local/bin:/usr/bin:/bin"
|
||||
Environment="VIRTUAL_ENV=/home/sirmrak/projects/.venv_satellite"
|
||||
|
||||
# 🔹 Разрешаем доступ к устройству (на всякий случай)
|
||||
PrivateDevices=false
|
||||
|
||||
# 🔹 Перезапуск при ошибке
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
|
||||
# 🔹 Логирование в journal
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
SyslogIdentifier=wyoming-event
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=Wyoming Satellite Service (Wake Mode)
|
||||
Requires=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=sirmrak
|
||||
WorkingDirectory=/home/sirmrak/projects/Satellite
|
||||
ExecStart=/home/sirmrak/projects/Satellite/start_satellite.sh
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,19 @@
|
||||
[Unit]
|
||||
Description=voskWakeWord
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=sirmrak
|
||||
ExecStart=/home/sirmrak/projects/.venv_satellite/bin/python \
|
||||
/home/sirmrak/projects/Satellite/local/vosk-wake-dev/script/run \
|
||||
--uri tcp://0.0.0.0:10400 \
|
||||
--model-path /home/sirmrak/projects/models/vosk-model-small-ru-0.22 \
|
||||
--rate 16000 \
|
||||
--wake-word "привет дройд"
|
||||
|
||||
WorkingDirectory=/home/sirmrak/projects/Satellite/local/vosk-wake-dev
|
||||
Restart=always
|
||||
RestartSec=1
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
Reference in New Issue
Block a user