summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1b3ca63)
raw | patch | inline | side by side (parent: 1b3ca63)
author | Ian Kelling <ian@iankelling.org> | |
Sun, 15 Nov 2020 22:41:29 +0000 (17:41 -0500) | ||
committer | Ian Kelling <ian@iankelling.org> | |
Sun, 15 Nov 2020 22:41:29 +0000 (17:41 -0500) |
14 files changed:
brc2 | patch | blob | history | |
btrbk-run | patch | blob | history | |
distro-end | patch | blob | history | |
dynamic-ip-update | patch | blob | history | |
filesystem/etc/systemd/system/openvpn-client-tr@.service | patch | blob | history | |
filesystem/etc/systemd/system/transmission-daemon-nn.service | [new file with mode: 0644] | patch | blob |
filesystem/etc/tr-resolv/stub-resolv.conf | [new file with mode: 0644] | patch | blob |
i3-sway/common.conf | patch | blob | history | |
install-my-scripts | patch | blob | history | |
mail-setup | patch | blob | history | |
mailtest-check | patch | blob | history | |
subdir_files/.config/i3/config | patch | blob | history | |
subdir_files/.config/sway/config | patch | blob | history | |
system-status | patch | blob | history |
index 5d20970f823d73c93285ff7c532f301667a727e3..34fb1dca03bfcb68a5093f82b7aae2edae11d1b0 100644 (file)
--- a/brc2
+++ b/brc2
acat() {
ngset
- hrcat /m/md/alerts/new/*
+ hrcat /m/md/alerts/{cur,new}/*
ngreset
hr; echo bk; hr
ssh bk.b8.nz "shopt -s nullglob; hrcat /m/md/INBOX/new/* /m/md/INBOX/cur/*"
}
aclear() {
ngset
- rm -f /m/md/alerts/new/*
+ rm -f /m/md/alerts/{cur,new}/*
ngreset
ssh bk.b8.nz "shopt -s nullglob; rm -f /m/md/INBOX/new/* /m/md/INBOX/cur/*"
system-status _
}
ad() {
pushd /a/bin/distro-setup/a >/dev/null
- ansible-playbook site.yml
+ ansible-playbook site.yml "$@"
popd >/dev/null
}
diff --git a/btrbk-run b/btrbk-run
index 499ec883ecacaaa5c0e134c3a8336a9867227b9a..7de9255227d7bae9651e4da3de896fd0c60440d6 100644 (file)
--- a/btrbk-run
+++ b/btrbk-run
target send-receive $vol/btrbk
EOF
fi
- if (( ${#target[@]} )); then
+ if (( ${#targets[@]} )); then
cat >>/etc/btrbk.conf <<EOF
volume $vol
subvolume $sub
diff --git a/distro-end b/distro-end
index 1c6af3bc784a63948bbead7ea7a67b21d3df3313..390bf55d23b8dcf46a13a6f657822e2a715dff77 100755 (executable)
--- a/distro-end
+++ b/distro-end
fi
-
-# trisquel 8 = openvpn, debian stretch = openvpn-client
-sd /etc/systemd/system/transmission-daemon-nn.service <<EOF
-[Unit]
-Description=Transmission BitTorrent Daemon netns
-After=network.target
-Requires=openvpn-client-tr@client.service
-After=openvpn-client-tr@client.service
-JoinsNamespaceOf=openvpn-client-tr@client.service
-
-[Service]
-User=debian-transmission
-Type=notify
-ExecStart=/usr/bin/transmission-daemon -f --log-error
-ExecReload=/bin/kill -s HUP \$MAINPID
-ExecStop=/bin/kill -s STOP \$MAINPID
-PrivateNetwork=true
-Nice=19
-BindReadOnlyPaths=/etc/nn-resolv:/run/systemd/resolve:norbind /etc/nn-resolv:/etc/nsswitch:norbind
-
-[Install]
-WantedBy=multi-user.target
-EOF
-ser daemon-reload
-
case $HOSTNAME in
kd|rp)
sgo transmission-daemon-nn
diff --git a/dynamic-ip-update b/dynamic-ip-update
index 710c11e9435aad3d9939478fe29fd6b299196655..1f9fe4c301f13acfaf2efe77a393f3bc8a08dbe8 100755 (executable)
--- a/dynamic-ip-update
+++ b/dynamic-ip-update
10.2.0.1)
dynhost=b8.nz
;;
- 10.0.0.1)
- dynhost=t.b8.nz
- ;;
*)
exit 0
;;
fi
if $up6; then
- if [[ $HOSTNAME == tp ]]; then
- cat >>$f <<EOF
-update delete $dynhost. AAAA
-update add $dynhost. 60 AAAA $ip6
-EOF
- fi
cat >>$f <<EOF
update delete $fqdn. AAAA
update add $fqdn. 60 AAAA $ip6
EOF
+else
+ cat >>$f <<EOF
+update delete $fqdn. AAAA
+EOF
fi
cat >>$f <<EOF
diff --git a/filesystem/etc/systemd/system/openvpn-client-tr@.service b/filesystem/etc/systemd/system/openvpn-client-tr@.service
index fdd71b18baf7a978460ada885e181b7767527a14..7a7d13097f25248a8cd7bcc1830519378941c23d 100644 (file)
ExecStartPre=/sbin/iptables-restore /a/bin/distro-setup/transmission-firewall/netns.rules
ExecStopPost=/usr/bin/flock -w 20 /tmp/newns.flock /a/bin/newns/newns stop %i
PrivateNetwork=true
-BindReadOnlyPaths=/etc/nn-resolv:/run/systemd/resolve:norbind /etc/nn-resolv:/etc/nsswitch:norbind
+BindReadOnlyPaths=/etc/tr-resolv:/run/systemd/resolve:norbind /etc/nn-resolv:/etc/nsswitch:norbind
[Install]
WantedBy=multi-user.target
diff --git a/filesystem/etc/systemd/system/transmission-daemon-nn.service b/filesystem/etc/systemd/system/transmission-daemon-nn.service
--- /dev/null
@@ -0,0 +1,19 @@
+[Unit]
+Description=Transmission BitTorrent Daemon netns
+After=network.target
+Requires=openvpn-client-tr@client.service
+After=openvpn-client-tr@client.service
+JoinsNamespaceOf=openvpn-client-tr@client.service
+
+[Service]
+User=debian-transmission
+Type=notify
+ExecStart=/usr/bin/transmission-daemon -f --log-error
+ExecReload=/bin/kill -s HUP $MAINPID
+ExecStop=/bin/kill -s STOP $MAINPID
+PrivateNetwork=true
+Nice=19
+BindReadOnlyPaths=/etc/tr-resolv:/run/systemd/resolve:norbind /etc/nn-resolv:/etc/nsswitch:norbind
+
+[Install]
+WantedBy=multi-user.target
diff --git a/filesystem/etc/tr-resolv/stub-resolv.conf b/filesystem/etc/tr-resolv/stub-resolv.conf
--- /dev/null
@@ -0,0 +1,2 @@
+nameserver 8.8.8.8
+options edns0
diff --git a/i3-sway/common.conf b/i3-sway/common.conf
index b69c26a50cbff053383b9a33a84cbf98e1117a6e..f263a3bd9c228132e2290a43e541dfa8aea89222 100644 (file)
--- a/i3-sway/common.conf
+++ b/i3-sway/common.conf
bindsym $mod+4 exec "x-www-browser -no-remote -P firefox-main-profile"
bindsym $mod+5 exec "/usr/local/bin/start-tor-browser"
bindsym $mod+6 exec "/a/bin/redshift.sh"
-bindsym $mod+equal exec "t s w; t in"
-bindsym $mod+Home exec "t out"
-#bindsym $mod+End exec "t s x; t in"
-bindsym $mod+grave exec "t s lunch; t in; t out -a '45 minutes from now'"
+# bindsym $mod+equal exec "t s w; t in"
+# bindsym $mod+Home exec "t out"
+# #bindsym $mod+End exec "t s x; t in"
+# bindsym $mod+grave exec "t s lunch; t in; t out -a '45 minutes from now'"
bindsym $mod+w focus parent
diff --git a/install-my-scripts b/install-my-scripts
index ada75a34c5678d1219316f47c0100e1be2a6dece..25e9c8edb2061d63d61e234317ec6e83820ea355 100755 (executable)
--- a/install-my-scripts
+++ b/install-my-scripts
# ran. Very strange, dunno why, but rsync won't do anything unless these
# changed, so that should fix it.
rsync -t --chmod=755 --chown=root:root /a/bin/log-quiet/log-once switch-mail-host btrbk-run mount-latest-subvol \
- check-subvol-stale system-status myi3status /usr/local/bin
+ check-subvol-stale system-status myi3status mailtest-check /usr/local/bin
rsync -t --chmod=755 --chown=root:root /a/bin/errhandle/err /usr/local/lib
diff --git a/mail-setup b/mail-setup
index 3bfc8b29a3fd3886584d60fd2b8060f2c75c5307..ea7ee4683ea2ba61ec1677ffe6c2f2f7759781ab 100755 (executable)
--- a/mail-setup
+++ b/mail-setup
# I might add somethign later.
EOF
+i /etc/exim4/conf.d/local_deny_exceptions_acl <<'EOF'
# This acl already exists in rcpt, this just makes it more widespread.
# See the comment there for its rationale. The reason it needs to be
# more widespread is that I've turned on sender verification, but cron
# emails can fail sender verification since I may be in a network that
# doesn't have my local dns.
-i /etc/exim4/conf.d/local_deny_exceptions_acl <<'EOF'
accept
authenticated = *
+
+# i setup a local programs smtp to mail.iankelling.org, this
+# skips sender verification for it.
+accept
+ hosts = 10.173.8.1
EOF
rm -fv /etc/exim4/data_local_acl # old path
# I originally set this to li.iankelling.org, but then ended up with errors when li tried to send
# mail to kd, so this should basically be a name that no host has as their
# canonical hostname since the actual host sits behind a nat and changes.
-# Seems logical for this to be the same as mailname.
MAIN_HARDCODE_PRIMARY_HOSTNAME = mail.iankelling.org
+# I used this to avoid sender verification, didnt work but it still
+# makes sense based on the spec.
+hosts_treat_as_local = defaultnn.b8.nz
EOF
/a/exe/cedit defaultnn /etc/hosts <<'EOF' || [[ $? == 1 ]]
-# this is just here to avoid mainlog errors, however, it doesnt seem to work
-# todo: look into it more. nsswitch.conf? cached result? i dunno
-# list matching forced to fail: failed to find host name for 10.173.8.1
10.173.8.1 defaultnn.b8.nz
EOF
;;&
# file, so I've saved that into ./mail-notes.conf.
cat >>/etc/exim4/update-exim4.conf.conf <<EOF
# man page: is used to build the local_domains list, together with "localhost"
-# iank.bid is for testing
-# mail.iankelling.org is for machines i own
-# this is duplicated in a later router
+# this is duplicated in a later router.
dc_other_hostnames='iankelling.org;zroe.org;r2e.iankelling.org'
EOF
vpnmanual:
debug_print = "R: dnslookup for $local_part@$domain"
driver = manualroute
- domains = iankelling.org:zroe.org:r2e.iankelling.org
+ domains = iankelling.org : zroe.org:r2e.iankelling.org
transport = remote_smtp
same_domain_copy_routing = yes
route_list = * 10.8.0.4
diff --git a/mailtest-check b/mailtest-check
index e8f146d274e30736432aee0646d36479fe3a6cbf..38cfc91f41a12519c6b08da194c529626a1ca3d5 100755 (executable)
--- a/mailtest-check
+++ b/mailtest-check
fi
done
if (( ${#results[@]} || ${#missing[@]} )); then
- printf "$HOSTNAME spamtest %s %s/%s\n" "$folder" "$latest"
+ printf "$HOSTNAME spamtest %s/%s\n" "$folder" "$latest"
if (( ${#results[@]} )); then
printf "unexpected %s" "${!results[*]} "
fi
printf "missing %s" "${missing[*]}"
fi
echo
+ spamassassin -D <"$latest"
fi
else
echo $HOSTNAME mailtest spamd pid not found
index 4ba06742692f272beab9ea77eace8c0ba6405c60..9948f389fa4cd7b892e2586fac1083a73c68feb4 100644 (file)
bindsym $mod+4 exec "x-www-browser -no-remote -P firefox-main-profile"
bindsym $mod+5 exec "/usr/local/bin/start-tor-browser"
bindsym $mod+6 exec "/a/bin/redshift.sh"
-bindsym $mod+equal exec "t s w; t in"
-bindsym $mod+Home exec "t out"
-#bindsym $mod+End exec "t s x; t in"
-bindsym $mod+grave exec "t s lunch; t in; t out -a '45 minutes from now'"
+# bindsym $mod+equal exec "t s w; t in"
+# bindsym $mod+Home exec "t out"
+# #bindsym $mod+End exec "t s x; t in"
+# bindsym $mod+grave exec "t s lunch; t in; t out -a '45 minutes from now'"
bindsym $mod+w focus parent
index 71a7fd3110aafafa946a164f5e412ce44f9a991c..bb9712ef384cdcbf00ae5ae7506021c1335a4ce2 100644 (file)
bindsym $mod+4 exec "x-www-browser -no-remote -P firefox-main-profile"
bindsym $mod+5 exec "/usr/local/bin/start-tor-browser"
bindsym $mod+6 exec "/a/bin/redshift.sh"
-bindsym $mod+equal exec "t s w; t in"
-bindsym $mod+Home exec "t out"
-#bindsym $mod+End exec "t s x; t in"
-bindsym $mod+grave exec "t s lunch; t in; t out -a '45 minutes from now'"
+# bindsym $mod+equal exec "t s w; t in"
+# bindsym $mod+Home exec "t out"
+# #bindsym $mod+End exec "t s x; t in"
+# bindsym $mod+grave exec "t s lunch; t in; t out -a '45 minutes from now'"
bindsym $mod+w focus parent
diff --git a/system-status b/system-status
index 93d31e4462b414166ef33f17bc5fd30378d7ef75..adf8dd57592ed342f29f5e8b26f519a892c26649 100644 (file)
--- a/system-status
+++ b/system-status
bouncemsg="message in /m/md/bounces/new"
fi
lo -1 bounce $bouncemsg
- glob=(/m/md/alerts/new/*)
+ glob=(/m/md/alerts/{new,cur}/*)
if [[ -e ${glob[0]} ]]; then
chars+=("A")
fi