[systemd] Add mail-ntfy scripts
This commit is contained in:
6
bin/.bin/mail-ntfy.py
Normal file → Executable file
6
bin/.bin/mail-ntfy.py
Normal file → Executable file
@ -1,3 +1,9 @@
|
||||
# /// script
|
||||
# dependencies = [
|
||||
# "requests",
|
||||
# ]
|
||||
# ///
|
||||
|
||||
import requests
|
||||
import os
|
||||
import imaplib
|
||||
|
||||
7
systemd/.config/systemd/user/mail-ntfy.service
Normal file
7
systemd/.config/systemd/user/mail-ntfy.service
Normal 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
|
||||
10
systemd/.config/systemd/user/mail-ntfy.timer
Normal file
10
systemd/.config/systemd/user/mail-ntfy.timer
Normal 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
|
||||
Reference in New Issue
Block a user