]> gitweb.morketsmerke.org Git - backup.git/commitdiff
Dodanie trzech nowych skryptów. Do sprawdzenia działania tunelu VPN oraz synchronizac...
authorxf0r3m <jakubstasinski@protonmail.com>
Sun, 29 Mar 2026 14:27:37 +0000 (16:27 +0200)
committerxf0r3m <jakubstasinski@protonmail.com>
Sun, 29 Mar 2026 14:27:37 +0000 (16:27 +0200)
debian-cd-rsync-cmd [new file with mode: 0755]
debian-mirror-sync-cmd [new file with mode: 0755]
vpn_watchdog [new file with mode: 0755]

diff --git a/debian-cd-rsync-cmd b/debian-cd-rsync-cmd
new file mode 100755 (executable)
index 0000000..ec4621a
--- /dev/null
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+rsync --times --links --hard-links --partial --block-size=8192  --recursive \
+  --include='*netinst*.iso' \
+  --include='*standard.iso' \
+  --exclude='bt-bd' \
+  --exclude='bt-cd' \
+  --exclude='bt-dvd' \
+  --exclude='iso-bd' \
+  --exclude='iso-dvd' \
+  --exclude='jigdo-16G' \
+  --exclude='jigdo-bd' \
+  --exclude='jigdo-cd' \
+  --exclude='jigdo-dlbd' \
+  --exclude='jigdo-dvd' \
+  --exclude='list-16G' \
+  --exclude='list-bd' \
+  --exclude='list-cd' \
+  --exclude='list-dlbd' \
+  --exclude='list-dvd' \
+  --exclude='log' \
+  --exclude='arm64' \
+  --exclude='armel' \
+  --exclude='armhf' \
+  --exclude='mips' \
+  --exclude='mips64el' \
+  --exclude='mipsel' \
+  --exclude='ppc64el' \
+  --exclude='s390x' \
+  --exclude='trace' \
+  --exclude='source' \
+  --exclude='bt-hybrid' \
+  --exclude='HEADER.html' \
+  --exclude='MD5*' \
+  --exclude='SHA1*' \
+  --exclude='SHA256*' \
+  --exclude='SHA512*' \
+  --exclude='*.packages' \
+  --exclude='*.contents' \
+  --exclude='*.log' \
+  --exclude='*.iso' \
+  --progress rsync://ftp.icm.edu.pl/pub/Linux/debian-cd/* /var/www/debian-cd;
+
diff --git a/debian-mirror-sync-cmd b/debian-mirror-sync-cmd
new file mode 100755 (executable)
index 0000000..c6d35a9
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+debmirror --verbose --postcleanup --method=http --host=ftp.pl.debian.org \
+  --root=debian --dist=trixie,bookworm,bullseye --arch=i386,amd64 \
+  --section=main,non-free-firmware --no-check-gpg /var/www/debian
+
diff --git a/vpn_watchdog b/vpn_watchdog
new file mode 100755 (executable)
index 0000000..fc65604
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+if $(ping -c 1 -w 1 $VPN_ROUTER_IP > /dev/null); then
+  echo "[ $(date) ] Do nothing." >> /var/log/vpn_watchdog.log;
+else
+  echo "[ $(date) ] Restart VPN service." >> /var/log/vpn_watchdog.log;
+  systemctl restart openvpn-local.service;
+fi