feat: systemd timery + skripty pro udrzbu serveru

Skripty (4):
- update.sh: apt update + upgrade + restart kdyz nutny + Telegram
- docker-update.sh: docker compose pull + up -d pro vsechny sluzby
- docker-zalohy.sh: tar.zst zaloha data/ adresaru na NAS
- server-report.sh: denni Telegram report (uptime, RAM, disk, Docker)

Systemd (8 - 4x service + 4x timer):
- docker-update: kazdou sobotu 18:00
- docker-zalohy: kazde utery 20:00
- server-report: kazdy den 09:30
- update-rpi: kazdy patek 18:00

Konfigurace:
- conf/telegram.conf.example: sablona pro Telegram credentials
- vsechny skripty ctou z /home/<user>/.telegram.conf (chmod 600)

Poznamka:
- vsechny cesty (/home/mates) a hostname jsou pevne v service souborech
- pro jineho uzivatele uprav User=, WorkingDirectory=, ExecStart=
- zadne IP adresy, tokeny ani PII v gitu
This commit is contained in:
2026-08-01 22:26:40 +02:00
commit fba29e5171
16 changed files with 827 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
[Unit]
Description=Aktualizace Docker kontejneru
After=network-online.target docker.service
Wants=network-online.target
[Service]
Type=oneshot
User=mates
WorkingDirectory=/home/mates/skripty/update-docker-script
ExecStart=/home/mates/skripty/update-docker-script/docker-update.sh
[Install]
WantedBy=multi-user.target
+9
View File
@@ -0,0 +1,9 @@
[Unit]
Description=Spoustet Docker update kazdou sobotu v 18:00
[Timer]
OnCalendar=Sat 18:00
Persistent=true
[Install]
WantedBy=timers.target
+13
View File
@@ -0,0 +1,13 @@
[Unit]
Description=Zaloha Docker aplikaci
After=network-online.target docker.service
Wants=network-online.target
[Service]
Type=oneshot
User=mates
WorkingDirectory=/home/mates/zalohy
ExecStart=/home/mates/zalohy/docker_zalohy.sh
[Install]
WantedBy=multi-user.target
+9
View File
@@ -0,0 +1,9 @@
[Unit]
Description=Spoustet Docker zalohy kazde utery ve 20:00
[Timer]
OnCalendar=Tue 20:00
Persistent=true
[Install]
WantedBy=timers.target
+13
View File
@@ -0,0 +1,13 @@
[Unit]
Description=Denní report serveru na Telegram
After=network-online.target docker.service
Wants=network-online.target
[Service]
Type=oneshot
User=mates
WorkingDirectory=/home/mates/skripty
ExecStart=/home/mates/skripty/server-report.sh
[Install]
WantedBy=multi-user.target
+9
View File
@@ -0,0 +1,9 @@
[Unit]
Description=Spoustet server report kazdy den v 09:30
[Timer]
OnCalendar=*-*-* 09:30:00
Persistent=true
[Install]
WantedBy=timers.target
+11
View File
@@ -0,0 +1,11 @@
[Unit]
Description=Aktualizace systému + Telegram notifikace
[Service]
Type=oneshot
User=mates
WorkingDirectory=/home/mates
ExecStart=/home/mates/update.sh
[Install]
WantedBy=multi-user.target
+9
View File
@@ -0,0 +1,9 @@
[Unit]
Description=Aktualizace každý pátek v 18:00
[Timer]
OnCalendar=Fri *-*-* 18:00:00
Persistent=true
[Install]
WantedBy=timers.target