add .service and .timer for profile stats script

This commit is contained in:
Mark Eaton
2026-01-10 17:01:20 -05:00
parent 07f1055008
commit 89991d5fc9
2 changed files with 37 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
# lives at ~/.config/systemd/user/profile-stats.service
# User-level systemd service to run update_profile.py
# Configuration is via ~/.config/profile-stats.env, no in-file path edits needed.
# Create that file with one line:
# REPO_PATH=/absolute/path/to/this/repo
# Then run:
# systemctl --user daemon-reload
[Unit]
Description=Run update_profile.py (profile stats updater)
[Service]
Type=oneshot
EnvironmentFile=%h/.config/profile-stats.env
ExecStartPre=/usr/bin/nm-online -q
ExecStart=/bin/bash -lc 'python3 ${REPO_PATH}/update_profile.py'
[Install]
WantedBy=default.target