-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtempcheck.service
More file actions
30 lines (25 loc) · 919 Bytes
/
Copy pathtempcheck.service
File metadata and controls
30 lines (25 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
[Unit]
Description=Check temperature and notify via Telegram
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
# --- User that runs the script ---
# Default: root (reads sensors and writes the state file without issues).
# To use an unprivileged user:
# 1) change User= and Group= below
# 2) make sure it can read 'sensors' (coretemp is usually world-readable)
# 3) make sure ALERT_FILE lives in a directory writable by that user
User=root
#Group=root
# Path of the script (must match where you copy it).
ExecStart=/root/alertemp.sh
# Credentials are read from /etc/alertemp.env by the script itself.
# Alternatively you can pass them here (not recommended, they end up in logs):
#Environment=THRESHOLD=80
#EnvironmentFile=-/etc/alertemp.env
# Minimal hardening (optional, uncomment to restrict)
#NoNewPrivileges=true
#ProtectSystem=strict
#ProtectHome=true
#ReadWritePaths=/tmp