Run PaperPi as a systemd service on a Raspberry Pi (M6)
メンテナーはふだん 1 日以内に返信
関連するプルリクエストがすでにマージされています。
- #297 @txoof-bot による — マージ済み
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- linux, python
- 領域
- devops, infrastructure
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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/).
- 主要言語
- Python
- スター
- 205
- フォーク
- 17
- 平均マージ
- 5時間 9分
- マージ済み PR(30日)
- 56
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
txoof/PaperPi のほかの issue
-
area:web
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
メンテナーはふだん 1 日以内に返信
-
area:core enhancement hardware
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
WLAN-Pi/wlanpi-profiler#341 ·
メンテナーはふだん 1 日以内に返信
-
Memory leak: the shared `validation_aborted_error` keeps every traceback it is raised through対応中かも @Fire162 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
graphql-python/graphql-core#287 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
roman-corgi/ctc-dip#160 ·
メンテナーはふだん 1 日以内に返信
-
type-bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
render_findings.py reads and writes in the host's default encoding, so findings.html breaks on a cp1252 Windows host対応中かも @Aaqibhafeezkhan が今日担当しました。 オープンbug good first issue mentored python size: XS up-for-grabs
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
dheerajjha/mcp-migrate#366 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信