Fix service restarter test
Deploy HEOS panel / deploy (push) Failing after 44s

This commit is contained in:
2026-09-15 00:08:00 +02:00
parent 9a5f2ac639
commit ce8596945e
2 changed files with 34 additions and 4 deletions
+11 -1
View File
@@ -120,11 +120,21 @@ runner can write to is enough:
sudo mkdir -p /var/www/html/heos
sudo chown "$(id -un)": /var/www/html/heos
echo "$(id -un) ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart heos-panel" \
echo "$(id -un) ALL=(ALL) NOPASSWD: $(command -v systemctl) restart heos-panel" \
| sudo tee /etc/sudoers.d/heos-panel
sudo chmod 440 /etc/sudoers.d/heos-panel
```
Run those **as the user the runner runs as**, not as yourself — the first
step of the workflow prints who that is. Two things in that sudoers line are
easy to get wrong, and the workflow checks both before it deploys anything,
printing the line back at you with the right values filled in:
- the user has to be the runner's, and
- the path has to be the one `sudo` resolves from `PATH`. It compares that
string against the sudoers line without following symlinks, so on a system
where `/bin` links to `/usr/bin` the two spellings are not interchangeable.
Then push. That first run deploys the files and builds the virtualenv, and
stops at the restart, because the service does not exist yet. Install it
from the copy it just put there: