[systemd] Add mail-ntfy scripts

This commit is contained in:
2025-02-07 14:08:49 -05:00
parent 1015d4b9c3
commit b36a12672c
3 changed files with 23 additions and 0 deletions

6
bin/.bin/mail-ntfy.py Normal file → Executable file
View File

@ -1,3 +1,9 @@
# /// script
# dependencies = [
# "requests",
# ]
# ///
import requests
import os
import imaplib

View File

@ -0,0 +1,7 @@
[Unit]
Description="Check for new email"
Requires=mail-ntfy.timer
[Service]
Type=simple
ExecStart=uv run /home/powellc/.bin/mail-ntfy.py

View File

@ -0,0 +1,10 @@
[Unit]
Description="Timer for checking email"
[Timer]
Unit=mail-ntfy.service
OnBootSec=10s
OnCalendar=*:0/1
[Install]
WantedBy=timers.target