21 lines
650 B
Desktop File
21 lines
650 B
Desktop File
# lives at ~/.config/systemd/user/libguides-notifier.service
|
|
|
|
# User-level systemd service to run main.py
|
|
# Uses a wrapper script so the working directory and .env are found correctly.
|
|
# Configuration is via ~/.config/libguides-notifier.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 main.py (LibGuides notifier)
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
EnvironmentFile=%h/.config/libguides-notifier.env
|
|
ExecStartPre=/usr/bin/nm-online -q
|
|
ExecStart=/bin/bash -lc '${REPO_PATH}/scripts/run_main.sh'
|
|
|
|
[Install]
|
|
WantedBy=default.target
|