bug fixes
authorIan Kelling <ian@iankelling.org>
Mon, 21 Oct 2019 19:36:24 +0000 (15:36 -0400)
committerIan Kelling <ian@iankelling.org>
Mon, 21 Oct 2019 19:36:24 +0000 (15:36 -0400)
mail-setup
system-status

index 8259ff8ca65a274ae814dc28cdaeed25d3ba3bce..4414c2a877c936756b8b3da3c8344bff92dbf737 100755 (executable)
@@ -162,7 +162,7 @@ pi() { # package install
   if [[ ! -r $f ]] || (( $(( $(date +%s) - $(stat -c %Y $f ) )) > 60*60*12 )); then
     m apt-get update
   fi
-  m DEBIAN_FRONTEND=noninteractive apt-get -y install --purge --auto-remove "$@"
+  DEBIAN_FRONTEND=noninteractive m apt-get -y install --purge --auto-remove "$@"
 }
 
 postmaster=alerts
index c58d9cea7f6eb3efceae04e08d85c1ce386bfa22..ddb5b738c28db81d1f4320ad10200de8b4f3f773 100755 (executable)
@@ -45,7 +45,10 @@ write-status() {
     chars+=("MAILPING!")
   fi
 
-  qlen=$(/usr/sbin/exiqgrep -o 60 -c -b | awk '{print $1}')
+  if ! qlen=$(/usr/sbin/exiqgrep -o 60 -c -b | awk '{print $1}'); then
+    # early in install process, we dont have permission yet for exiqgrep
+    qlen=$(sudo /usr/sbin/exiqgrep -o 60 -c -b | awk '{print $1}')
+  fi
   if ((qlen)); then
     chars+=("q $qlen")
   fi