OS起動時のサーバー自動起動 (systemd / タスクスケジューラ) (#59) - #83
Open
hide10 wants to merge 2 commits into
Open
Conversation
- scripts/mf-tracker.service: systemd ユーザーサービスのテンプレート - scripts/register-task.ps1: Windows ログオン時タスク登録/解除 - install.sh: --autostart で systemd ユーザーサービスを生成・有効化 - install.ps1: -AutoStart で register-task.ps1 を実行 - tests/test_systemd_unit.py: ユニットの構文・構造を検証 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
4 tasks
- scripts/register-wsl-startup.sh: Windowsスタートアップに VBS ランチャを置き、 ログオン時に wsl -d <distro> を無音起動(管理者権限不要、--unregisterで解除) - docs/autostart.md: Linux / WSL+Windows / ネイティブWindows の3経路を整理 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Owner
Author
|
WSL 運用向けの導線を追加しました。
実機(WSL2 Ubuntu, systemd=true)で動作確認済み: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
PC起動/ログイン時にダッシュボードが自動起動するよう、OS別の登録手段を追加した (#59)。
変更内容
__WORKDIR__/__PYTHON__を install.sh が絶対パスへ置換する。Restart=on-failure、WantedBy=default.target。pythonw.exeでコンソール非表示起動。-Unregisterで解除。--autostartでユニットを生成しsystemctl --user enable --nowまで実行。systemctl 不在時は警告してスキップ。-AutoStartで register-task.ps1 を呼ぶ。起動コマンドは既存どおり
python -m src.web.server(127.0.0.1:8080)。自動テスト(pytest で検証済み)
tests/test_systemd_unit.py6件パス)bash -n install.sh構文OK /systemd-analyze verifyで構文エラーなし(実行ファイル不在の指摘のみ)人間が確認すること
bash install.sh --autostart後、reboot(またはsystemctl --user restart mf-tracker)でサーバーが自動起動するかloginctl enable-linger $USERが必要か確認install.ps1 -AutoStart後、ログオンでコンソール非表示のまま起動するかsystemctl --user disable --now mf-tracker/register-task.ps1 -Unregister)が正常か🤖 Generated with Claude Code