Run PaperPi as a systemd service on a Raspberry Pi (M6)
Maintainer thường phản hồi trong vòng 1 ngày
Một pull request liên quan đã được merge.
- #297 của @txoof-bot — đã merge
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 38/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- linux, python
- Lĩnh vực
- devops, infrastructure
Hướng nghiên cứu
Start with the existing service notification behavior referenced in M4 #220 and process shutdown behavior in #209, then inspect the install/ area and the planned install/paperpi.service and install/install.sh entry points. Check the service settings with systemd-analyze verify and the CI checks described in the issue. Done means boot starts PaperPi, a killed main process is restarted without leaving an old process, and systemctl stop clears the screen within 45 seconds.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What
Run PaperPi v2 as a systemd service on a Raspberry Pi: it starts at boot, is restarted after a crash or a stuck loop, and stops cleanly. This comes before the Docker install of M6, so this Pi (9.7" IT8951) can show PaperPi all the time. Includes #209.
Plan
install/paperpi.service, the service file:Type=notifyandWatchdogSec=120: systemd counts PaperPi as started afterREADY=1and restarts it when no "still running" message comes for 2 minutes (PaperPi already sends these, M4 #220).NotifyAccess=main(the default): only the main process counts, not plugin processes.RuntimeDirectory=paperpi(makes/run/paperpifor the health file),StateDirectory=paperpi(/var/lib/paperpi).TimeoutStopSec=45: longer than the exit clear of the screen (30 s) plus the check (2 s).ExecReloadsends SIGHUP, sosystemctl reload paperpiapplies config changes.Restart=on-failure, with a limit on restarts in a row so a broken setup can't loop forever.- Keep the default
KillMode=control-group: stopping the service ends every PaperPi process (#209). - Runs as its own user with access to SPI and GPIO only; extra protection settings where they don't block the screen or the web interface.
install/install.sh(run with sudo): makes the user, installs PaperPi into its own folder with uv, writes a starting config to/etc/paperpi/paperpi.tomlif there is none, installs and starts the service. Also an update command and an uninstall command.- Tests:
- CI: check the service file has the settings above (and no
KillMode=process/none), andsystemd-analyze verifypasses. - On this Pi: a check script that starts the service, kills the main process with
kill -9, and confirms no PaperPi process is left (#209); and thatsystemctl stopclears the screen within the time limit.
- CI: check the service file has the settings above (and no
docs/install-systemd.md: install, update, uninstall, logs (journalctl -u paperpi), reload, where the files are.
PR split
One PR, about 400–550 changed lines: service file, install/update/uninstall script, tests, docs. If it grows past ~800 lines, the update and uninstall commands move to a second PR.
Done when
- After a reboot of this Pi, the 9.7" screen shows PaperPi without anyone starting it.
kill -9of the main process: systemd starts PaperPi again, and no old process is left.systemctl stop paperpistops within 45 s and clears the screen.
Area
install (install/).
- Ngôn ngữ chính
- Python
- Star
- 205
- Fork
- 17
- Merge trung bình
- 5 giờ 9 phút
- Pull request đã merge (30 ngày)
- 56
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của txoof/PaperPi
-
area:web
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
-
area:core enhancement hardware
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của txoof/PaperPi
Issue tương tự
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
sergey-miryanov/gcmon#230 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Azure-Samples/azure-search-openai-demo#3249 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[BUG] Failed archive extraction deletes the dataset cacheCó thể đã có người làm @dajiaohuang đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
alibaba/GraphScope#4674 ·