minor improvements
authorIan Kelling <ian@iankelling.org>
Sun, 11 Jul 2021 10:38:08 +0000 (06:38 -0400)
committerIan Kelling <ian@iankelling.org>
Sun, 11 Jul 2021 10:38:08 +0000 (06:38 -0400)
brc2
distro-end
epanic-clean
i3-sway/i3.conf
install-my-scripts
pkgs
subdir_files/.config/i3/config
subdir_files/.gnupg/gpg.conf

diff --git a/brc2 b/brc2
index f82c3d71df5ffb2a34f959058148b9f1f57a5de1..b57789fce80b4ae784a398c2e7bd54b83dfaa18e 100644 (file)
--- a/brc2
+++ b/brc2
@@ -930,7 +930,7 @@ ilogs() {
 ilog() {
   chan=${1:-#fsfsys}
   # use * instead of -r since that does sorted order
-  ssh root@iankelling.org "cd /var/lib/znc/moddata/log/iank/freenode/$chan && hr && for x in *; do echo \$x; sed \"s/^./\${x%log}/\" \$x; hr; done" | less +G
+  ssh root@iankelling.org "cd /var/lib/znc/moddata/log/iank/libera/$chan && hr && for x in *; do echo \$x; sed \"s/^./\${x%log}/\" \$x; hr; done" | less +G
 }
 
 o() {
@@ -1441,17 +1441,17 @@ mailnncheck() {
 
 
 vpncmd() {
-  m sudo --preserve-env=PATH -E nsenter -t $(pgrep -f "/usr/sbin/openvpn .* --config /etc/openvpn/.*client.conf") -n -m "$@"
+  m sudo env "PATH=$PATH" nsenter -t $(pgrep -f "/usr/sbin/openvpn .* --config /etc/openvpn/.*client.conf") -n -m "$@"
 }
 vpnf() {
-  vpncmd sudo --preserve-env=PATH -E -u iank abrowser -no-remote -P vpn &r
+  vpncmd sudo -u iank env "PATH=$PATH" abrowser -no-remote -P vpn &r
 }
 vpn2f() {
-  vpncmd sudo --preserve-env=PATH -E -u iank abrowser -no-remote -P vpn2 &r
+  vpncmd sudo -u iank env "PATH=$PATH" abrowser -no-remote -P vpn2 &r
 }
 
 vpni() {
-  vpncmd sudo --preserve-env=PATH -E -u iank "$@"
+  vpncmd sudo -u iank env "PATH=$PATH" "$@"
 }
 vpnbash() {
   vpncmd bash
index e49a24e90f680b463a1ccedd99297bf3cc7cdf69..2ca20056cb876012a45a5571eb6147af33ac25e9 100755 (executable)
@@ -588,6 +588,12 @@ case $HOSTNAME in
     # general vpn for as needed use
     vpn-server-setup -d -r -4 10.5.5 -p 443 -n hole
 
+    # todo: consider if this should exist for the
+    # other vpn server
+    teeu /etc/openvpn/server/hole.conf <<'EOF'
+client-to-client
+EOF
+
     # sullivan d8
     sd /etc/openvpn/client-config-hole/sd8 <<'EOF'
 ifconfig-push 10.5.5.41 255.255.255.0
@@ -597,6 +603,9 @@ EOF
 ifconfig-push 10.5.5.42 255.255.255.0
 EOF
 
+    sd /etc/openvpn/client-config-hole/onep9 <<'EOF'
+ifconfig-push 10.5.5.14 255.255.255.0
+EOF
     sd /etc/openvpn/client-config-hole/sy <<'EOF'
 ifconfig-push 10.5.5.12 255.255.255.0
 EOF
index f08d755245c36e93664831eedb2713b53a91d62c..d75574c8f46487b4e85c4c3480551fcb91476f6b 100755 (executable)
@@ -20,36 +20,41 @@ if [[ ! -s /var/log/exim4/paniclog ]]; then
   exit 0
 fi
 
-regex="malware acl condition"
-found=false
-wipe=true
-while read -r d1 d2; do
-  found=true
-  tmptime=$(date -d "$d1 $d2" +%s)
-  # dont consider every matching line, just those in > 60 second intervals
-  if [[ ! $logtime ]]; then
-    logtime=$tmptime
-  elif (( tmptime > logtime + 60 )); then
-    logtime=$tmptime
-  else
-    continue
+while read -r service regex; do
+  found=false
+  wipe=true
+  while read -r d1 d2; do
+    found=true
+    tmptime=$(date -d "$d1 $d2" +%s)
+    # dont consider every matching line, just those in > 60 second intervals
+    if [[ ! $logtime ]]; then
+      logtime=$tmptime
+    elif (( tmptime > logtime + 60 )); then
+      logtime=$tmptime
+    else
+      continue
+    fi
+    sec_min=$((logtime - 60))
+    sec_max=$((logtime + 60))
+    jmin="$(date -d @$sec_min "+%F %H:%M:%S")"
+    jmax="$(date -d @$sec_max "+%F %H:%M:%S")"
+    description=$(systemctl cat $service | sed -rn 's/^ *Description=(.*)/\1/p')
+    if ! journalctl -u $service -S "$jmin" -U "$jmax" \
+        | grep "Starting $description" &>/dev/null; then
+      wipe=false
+      break
+    fi
+  done < <(awk "/$regex/ "'{print $1,$2}' /var/log/exim4/paniclog)
+  if $found && $wipe; then
+    if [[ ! -w /var/log/exim4/paniclog-archive ]]; then
+      $s touch /var/log/exim4/paniclog-archive
+      $s chgrp adm /var/log/exim4/paniclog-archive
+      $s chmod 664 /var/log/exim4/paniclog-archive
+    fi
+    grep -E "$regex" /var/log/exim4/paniclog >> /var/log/exim4/paniclog-archive
+    $s sed -ri "/$regex/d" /var/log/exim4/paniclog
   fi
-  sec_min=$((logtime - 60))
-  sec_max=$((logtime + 60))
-  jmin="$(date -d @$sec_min "+%F %H:%M:%S")"
-  jmax="$(date -d @$sec_max "+%F %H:%M:%S")"
-  if ! journalctl -u clamav-daemon -S "$jmin" -U "$jmax" \
-      | grep 'Starting Clam AntiVirus userspace daemon' &>/dev/null; then
-    wipe=false
-    break
-  fi
-done < <(awk "/$regex/ "'{print $1,$2}' /var/log/exim4/paniclog)
-if $found && $wipe; then
-  if [[ ! -w /var/log/exim4/paniclog-archive ]]; then
-    $s touch /var/log/exim4/paniclog-archive
-    $s chgrp adm /var/log/exim4/paniclog-archive
-    $s chmod 664 /var/log/exim4/paniclog-archive
-  fi
-  grep -E "$regex" /var/log/exim4/paniclog >> /var/log/exim4/paniclog-archive
-  $s sed -ri "/$regex/d" /var/log/exim4/paniclog
-fi
+done <<'EOF'
+clamav-daemon malware acl condition
+spamassassin spam acl condition
+EOF
index 473d8f56c6122511e895462bff1466f09586ec4f..222897d9fc9792d651a6e410020ef935caa11f34 100644 (file)
@@ -3,10 +3,14 @@ bindsym $mod+Shift+q exec "i3-nagbar -t warning -m 'You pressed the exit shortcu
 
 bindsym $mod+Shift+p restart
 
-# bar {
-# #status_command i3status
+# need this for kde connect
+bar {
+status_command i3status
 # #status_command          /usr/local/bin/myi3status
-mode hide
+mode hide
 # hidden_state hide
 # font pango:monospace 14
-# }
+}
+
+exec copyq
+exec /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd
index 28481421b6a767492fc02abb77483a9586e568a0..404cd83452b818fd9871663ba597611b8af0b0c1 100755 (executable)
@@ -36,5 +36,9 @@ x="$(readlink -f -- "${BASH_SOURCE[0]}")"; cd ${x%/*} # directory of this file
 # changed, so that should fix it.
 /a/bin/log-quiet/setup
 rsync -t --chmod=755 --chown=root:root switch-mail-host btrbk-run mount-latest-subvol \
-      check-subvol-stale system-status myi3status mailtest-check /usr/local/bin
+      check-subvol-stale system-status myi3status mailtest-check \
+      /a/bin/log-quiet/sysd-mail-once \
+      btrfsmaint \
+      dynamic-ip-update \
+      /usr/local/bin
 rsync -t --chmod=755 --chown=root:root /a/bin/errhandle/err /usr/local/lib
diff --git a/pkgs b/pkgs
index 2aad9437813d3b290dd3bf1891ea8f1563b87ddb..bcfb321c655df77e0c963fc094b50fb9e5165e38 100644 (file)
--- a/pkgs
+++ b/pkgs
@@ -79,6 +79,9 @@ p3=(
   bwm-ng
   ccache
   cloc
+  # pretty complex config. i just setup to ignore my password managerf
+  # according to the docs, and C-M-v to open the main window
+  copyq
   cpulimit
   cron
   debian-archive-keyring
@@ -132,6 +135,7 @@ p3=(
   hplip
   hunspell
   i3lock
+  i3status
   iotop
   info
   inotify-tools
index d029ccbe69f57950c17e92291fc026e1dfee05ce..957b432acd9ffee83523243fae48c9f95d74d070 100644 (file)
@@ -101,10 +101,14 @@ bindsym $mod+Shift+q exec "i3-nagbar -t warning -m 'You pressed the exit shortcu
 
 bindsym $mod+Shift+p restart
 
+# need this for kde connect
 bar {
 status_command i3status
-#status_command          /usr/local/bin/myi3status
+# #status_command          /usr/local/bin/myi3status
 mode hide
-hidden_state hide
+hidden_state hide
 # font pango:monospace 14
 }
+
+exec copyq
+exec /usr/lib/x86_64-linux-gnu/libexec/kdeconnectd
index c764ca7a593015a6eb3d8edbee1bbcb620ea9d50..9868101d360d6ff94adb5a6252972671aa9a6b89 100644 (file)
@@ -42,12 +42,11 @@ default-key B125F60B7B287FF6A2B7DF8F170AF0E2954295DF
 #keyserver hkp://keys.openpgp.org
 #keyserver hkp://pgp.mit.edu
 #keyserver hkp://keyserver.pgp.com
-keyserver hkp://ipv4.pool.sks-keyservers.net
+#keyserver hkp://ipv4.pool.sks-keyservers.net
 #keyserver hkp://keys.gnupg.net
-#keyserver hkp://keyserver.ubuntu.com
+keyserver hkp://keyserver.ubuntu.com
 #keyserver hkp://keyring.debian.org
 #keyserver keyserver.ubuntu.com
-
 # more secure hkps, but had problems with my gpg version
 #keyserver hkps://hkps.pool.sks-keyservers.net