summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2015-07-27 15:34:28 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-07-27 15:34:28 +0200
commit1bad0f4520824667e408dfac8575d92aea8148b9 (patch)
treea4d8c0b260b2af380acdabfde712a6c8f1e0af0a
parent11ebc79bad89075267574a032b46eb992a0a6f32 (diff)
downloadbin-1bad0f4520824667e408dfac8575d92aea8148b9.tar.gz
bin-1bad0f4520824667e408dfac8575d92aea8148b9.tar.xz
misc changes
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-xcreate-new-vm.sh2
-rwxr-xr-xremote-notify-client.sh2
-rwxr-xr-xvpn-connect13
-rwxr-xr-xwireshark-remote5
-rwxr-xr-xzfs-backup.sh2
5 files changed, 15 insertions, 9 deletions
diff --git a/create-new-vm.sh b/create-new-vm.sh
index 8e51a15..b42e3cd 100755
--- a/create-new-vm.sh
+++ b/create-new-vm.sh
@@ -5,7 +5,7 @@ set -e
name=$1
size=20G
-TMPDIR="`mktemp -d "/tmp/fb-client-up.XXXXXX"`"
+TMPDIR="$(mktemp -d "/tmp/${0##*/}.XXXXXX")"
trap "rm -rf '${TMPDIR}'" EXIT TERM
cd "$TMPDIR"
diff --git a/remote-notify-client.sh b/remote-notify-client.sh
index 5bcca11..c53fa95 100755
--- a/remote-notify-client.sh
+++ b/remote-notify-client.sh
@@ -4,7 +4,7 @@
exec 0<&-
-sup ssh mistral 'socat unix-connect:notify.sock stdout' |
+sup ssh caju 'socat unix-connect:notify.sock stdout' |
while read heading message; do
if [[ -n $heading ]]; then
notify-send --hint=int:transient:1 -t 5000 -- "${heading}" "${message}";
diff --git a/vpn-connect b/vpn-connect
index 692310e..cf1a764 100755
--- a/vpn-connect
+++ b/vpn-connect
@@ -1,10 +1,15 @@
#!/bin/bash
-vpnc tu.conf
+vpnc --password-helper "$HOME/bin/vpn-getpass" tu.conf
ip route delete default dev vpntun0
-ip route add default via 192.168.4.1 dev eth0
+ip route add default via 192.168.4.1 dev eno1
-for i in 128.130.0.0/15 192.35.240.0/24 193.170.3.0/24 193.170.72.0/21; do
- ip route add $i dev vpntun0
+for i in 128.130.0.0/15 192.35.240.0/24 193.170.3.0/24 193.170.72.0/21; do
+ ip route add $i dev vpntun0
+done
+
+hostnames=(ieeexplore.ieee.org dl.acm.org)
+for ip in $(dig +short "${hostnames[@]}"); do
+ ip route add dev vpntun0 "$ip"
done
diff --git a/wireshark-remote b/wireshark-remote
index 0d4793d..e571eea 100755
--- a/wireshark-remote
+++ b/wireshark-remote
@@ -4,5 +4,6 @@ host="$1"
iface="$2"
#wireshark -k -i <(ssh "$host" tshark -i "$iface" -w - not tcp port 22)
-#wireshark -k -i <(ssh "$host" dumpcap -q -i "$iface" -w /dev/stdout not tcp port 22)
-wireshark -k -i <(ssh "$host" /home/flo/capture.sh "$iface")
+#wireshark -k -i <(ssh "$host" dumpcap -q -i "$iface" -w /dev/stdout 'not\ tcp\ port\ 22')
+wireshark -k -i <(ssh "$host" dumpcap -q -P -i "$iface" -w - -f 'not\ port\ 22')
+#wireshark -k -i <(ssh "$host" /home/flo/capture.sh "$iface")
diff --git a/zfs-backup.sh b/zfs-backup.sh
index 40dc4f6..733c570 100755
--- a/zfs-backup.sh
+++ b/zfs-backup.sh
@@ -59,7 +59,7 @@ clean_snapshots() {
/root/zfs_snapshot_cleanup.sh "$dst_fs" daily 10
/root/zfs_snapshot_cleanup.sh "$dst_fs" weekly 4
- /root/zfs_snapshot_cleanup.sh "$dst_fs" monthly 2
+ /root/zfs_snapshot_cleanup.sh "$dst_fs" monthly 3
}
create_and_clean_snapshots() {