debmaker/ressources/homeassistant/rootfs/usr/lib/systemd/system/babybuddy.service

21 lines
758 B
SYSTEMD
Raw Normal View History

2023-11-21 01:24:31 +01:00
[Unit]
Description=homeassistant
After=network.target
[Service]
User=homeassistant
Group=homeassistant
EnvironmentFile=/etc/default/homeassistant
ExecStartPre=python3 -m venv /var/lib/homeassistant/.venv
ExecStartPre=/var/lib/homeassistant/.venv/bin/pip install -r /usr/share/homeassistant/requirements.txt
ExecStartPre=/var/lib/homeassistant/.venv/bin/python3 /usr/share/homeassistant/manage.py migrate
ExecStartPre=/var/lib/homeassistant/.venv/bin/python3 /usr/share/homeassistant/manage.py createcachetable
ExecStart=/var/lib/homeassistant/.venv/bin/python3 /usr/share/homeassistant/manage.py runserver 0.0.0.0:8000
WorkingDirectory=/var/lib/homeassistant
StandardOutput=inherit
StandardError=inherit
Restart=always
[Install]
WantedBy=multi-user.target