mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-11 19:34:03 +01:00
Two adb devices are normally attached (USB phone + a network target), so the importer correctly refused to guess which one to pull from. Pin ENDURAIN_ADB_SERIAL in the unit; verified with a real run that now reports "pulled 5 file(s) from the phone". Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GbYEnfGnf1988cdFdGebot
25 lines
1.1 KiB
Desktop File
25 lines
1.1 KiB
Desktop File
[Unit]
|
|
Description=Import RunnerUp activities into Endurain
|
|
Documentation=file:///home/kuhy/testsAndMisc/endurain/README.md
|
|
# Endurain runs in Docker; without this the timer fires during boot before the
|
|
# stack is listening and logs a spurious "not reachable" failure.
|
|
After=network-online.target docker.service
|
|
Wants=network-online.target
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
WorkingDirectory=/home/kuhy/testsAndMisc
|
|
Environment=ENDURAIN_URL=http://127.0.0.1:8085
|
|
Environment=ENDURAIN_INBOX=/home/kuhy/cloud/RunnerUp
|
|
Environment=ENDURAIN_STATE=/home/kuhy/.local/state/endurain-import
|
|
Environment=ENDURAIN_BULK_DIR=/var/opt/endurain/backend/data/activity_files/bulk_import
|
|
# Two adb devices are usually attached (USB phone + a network target), and the
|
|
# importer refuses to guess between them. Pin the phone explicitly.
|
|
Environment=ENDURAIN_ADB_SERIAL=23181JEGR08034
|
|
# The API key is read from a mode-600 file rather than embedded here: systemd
|
|
# unit files are world-readable.
|
|
ExecStart=/usr/bin/bash -c 'ENDURAIN_API_KEY="$(cat /home/kuhy/testsAndMisc/endurain/.api_key)" /home/kuhy/testsAndMisc/.venv/bin/python -m python_pkg.endurain_import'
|
|
|
|
[Install]
|
|
WantedBy=default.target
|