Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Run PaperPi as a systemd service on a Raspberry Pi (M6)

クローズ
#295 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

関連するプルリクエストがすでにマージされています。

  • #297 @txoof-bot による — マージ済み

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
linux, python

調査の方向性

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 の本文から書いたものです。

説明

in-progress

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=notify and WatchdogSec=120: systemd counts PaperPi as started after READY=1 and 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/paperpi for 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).
    • ExecReload sends SIGHUP, so systemctl reload paperpi applies 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.toml if 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), and systemd-analyze verify passes.
    • 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 that systemctl stop clears the screen within the time limit.
  • 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 -9 of the main process: systemd starts PaperPi again, and no old process is left.
  • systemctl stop paperpi stops within 45 s and clears the screen.

Area

install (install/).

主要言語
Python
スター
205
フォーク
17
平均マージ
5時間 9分
マージ済み PR(30日)
56

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

txoof/PaperPi のほかの issue

txoof/PaperPi の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。