From: xf0r3m Date: Sun, 29 Mar 2026 14:27:37 +0000 (+0200) Subject: Dodanie trzech nowych skryptów. Do sprawdzenia działania tunelu VPN oraz synchronizac... X-Git-Url: https://gitweb.morketsmerke.org/?a=commitdiff_plain;h=4b5f0d421cb4d2ea429518a4ec7f7717369642e5;p=backup.git Dodanie trzech nowych skryptów. Do sprawdzenia działania tunelu VPN oraz synchronizacji danych debiana. --- 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