From 4b5f0d421cb4d2ea429518a4ec7f7717369642e5 Mon Sep 17 00:00:00 2001 From: xf0r3m Date: Sun, 29 Mar 2026 16:27:37 +0200 Subject: [PATCH] =?utf8?q?Dodanie=20trzech=20nowych=20skrypt=C3=B3w.=20Do?= =?utf8?q?=20sprawdzenia=20dzia=C5=82ania=20tunelu=20VPN=20oraz=20synchron?= =?utf8?q?izacji=20danych=20debiana.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- debian-cd-rsync-cmd | 43 ++++++++++++++++++++++++++++++++++++++++++ debian-mirror-sync-cmd | 6 ++++++ vpn_watchdog | 8 ++++++++ 3 files changed, 57 insertions(+) create mode 100755 debian-cd-rsync-cmd create mode 100755 debian-mirror-sync-cmd create mode 100755 vpn_watchdog diff --git a/debian-cd-rsync-cmd b/debian-cd-rsync-cmd new file mode 100755 index 0000000..ec4621a --- /dev/null +++ b/debian-cd-rsync-cmd @@ -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 index 0000000..c6d35a9 --- /dev/null +++ b/debian-mirror-sync-cmd @@ -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 index 0000000..fc65604 --- /dev/null +++ b/vpn_watchdog @@ -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 -- 2.39.5