# This is a template. Do not install it directly -- run # scripts/install/install_web_service.sh (or install_service.sh, which # renders this same file). Both substitute: # __PROJECT_ROOT_DIR__ -> the directory the project is installed in # __USER__ -> the user the web interface runs as # # This file is the only description of the unit. It used to be duplicated as # an inline heredoc in both installers, which drifted apart; src/startup_validator.py # compares the installed unit against this template, so a second copy means a # permanent, unclearable drift warning on every boot. [Unit] Description=LED Matrix Web Interface Service After=network-online.target Wants=network-online.target [Service] Type=simple User=__USER__ WorkingDirectory=__PROJECT_ROOT_DIR__ Environment=USE_THREADING=1 ExecStart=/usr/bin/python3 __PROJECT_ROOT_DIR__/scripts/utils/start_web_conditionally.py Restart=on-failure RestartSec=10 StandardOutput=syslog StandardError=syslog SyslogIdentifier=ledmatrix-web # Automatically create and manage cache directory CacheDirectory=ledmatrix CacheDirectoryMode=0775 [Install] WantedBy=multi-user.target