commit - 07c645bb1acfe39b04117fded76b8496c2ce8d3a
commit + be65ef492789ea55ea25f290ecf4b5093a0ccda5
blob - /dev/null
blob + 4282d207405346ee0dcfdc065d536943182bf43b (mode 755)
--- /dev/null
+++ bupstash-backup
+#!/bin/sh
+
+## bupstash new-key -o /home/gonzalo/.crypto/super-secret.key
+export BUPSTASH_REPOSITORY=/NAS/Backups/laptop
+export BUPSTASH_KEY=/home/gonzalo/.crypto/super-secret.key
+
+_MOUNTED=$(ls -al /NAS/Backups/laptop/mounted | wc -l)
+
+printf "[+] Starting backup...\n"
+
+if [ ${_MOUNTED} -eq "1" ]; then
+ bupstash put host="$(hostname)" name=home.tar /home/gonzalo
+else
+ printf "== The NAS is not mounted ==\n"
+fi
blob - dd13e0e20b7efc7e638bbfa4fcfcdb168bde953e (mode 644)
blob + dd13e0e20b7efc7e638bbfa4fcfcdb168bde953e (mode 755)
blob - 94746d249c62ea0364b6cf86b1b36f09ea4323d9 (mode 644)
blob + 73d6c41b8ed6594562af26ff6ee0840e7efef1e6 (mode 755)
--- reset-net
+++ reset-net
#!/bin/sh
if test "$(whoami)" != root; then
- doas "$0" "$@"
- exit $?
+ doas "$0" "$@"
+ exit $?
fi
-printf "[+] Killing OpenVPN\n"
-pkill -9 -x openvpn >/dev/null
-pkill -9 -x openvpn >/dev/null
-pkill -9 -x openvpn >/dev/null
-printf "[+] Destroying tun*\n"
-ifconfig tun0 down >/dev/null
-ifconfig tun0 destroy >/dev/null
-printf "[+] Marking down axen0 & iwm0\n"
-ifconfig axen0 down >/dev/null
-ifconfig iwm0 down >/dev/null
-printf "[+] Marking down trunk0\n"
-ifconfig trunk0 destroy >/dev/null
-ifconfig trunk0 destroy >/dev/null
+printf "[+] Killing VPN\n"
+ifconfig wg0 down >/dev/null 2>&1
+printf "[+] Marking down re0 & iwm0\n"
+ifconfig re0 down >/dev/null 2>&1
+ifconfig bwfm0 down >/dev/null 2>&1
printf "[+] Flushing routes\n"
-route -n flush >/dev/null
+route -n flush >/dev/null 2>&1
+route -T1 -n flush >/dev/null 2>&1
printf "[+] Starting networking with VPN\n"
+ifconfig bwfm0 up
+ifconfig wg0 up
sh /etc/netstart
blob - e9ac65032653d60a09237c7e2e103a9624855d7a (mode 644)
blob + ab77c8594e03107f78f0556aad75c2e31cde17ad (mode 755)
--- reset-net-without-vpn
+++ reset-net-without-vpn
#!/bin/sh
if test "$(whoami)" != root; then
- doas "$0" "$@"
- exit $?
+ doas "$0" "$@"
+ exit $?
fi
-printf "[+] Killing OpenVPN\n"
-pkill -9 -x openvpn >/dev/null
-pkill -9 -x openvpn >/dev/null
-pkill -9 -x openvpn >/dev/null
-printf "[+] Destroying tun*\n"
-ifconfig tun0 down >/dev/null
-ifconfig tun0 destroy >/dev/null
-printf "[+] Marking down axen0 & iwm0\n"
-ifconfig axen0 down >/dev/null
-ifconfig iwm0 down >/dev/null
-printf "[+] Marking down trunk0\n"
-ifconfig trunk0 destroy >/dev/null
-ifconfig trunk0 destroy >/dev/null
+printf "[+] Destroying wg*\n"
+ifconfig wg0 down 2>&1 > /dev/null
+printf "[+] Marking down re0 & iwm0\n"
+#ifconfig re0 down 2>&1 > /dev/null
+ifconfig bwfm0 down 2>&1 > /dev/null
printf "[+] Flushing routes\n"
-route -n flush >/dev/null
+route -T1 -n flush 2>&1 > /dev/null
+route -n flush 2>&1 > /dev/null
printf "[+] Starting networking without VPN\n"
-sh /etc/netstart axen0 iwm0 trunk0
+ifconfig bwfm0 rdomain 0
+dhclient bwfm0
blob - /dev/null
blob + aa57f56f0c76a3d0cb14d7b11d5d5421025c1617 (mode 755)
--- /dev/null
+++ sin_espacios
+for f in *; do mv "$f" `echo $f | tr ' ' '_'`; done