iankelling.org
/
git
/
distro-setup
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b3e6791
)
bug fixes
author
Ian Kelling
<ian@iankelling.org>
Mon, 21 Oct 2019 19:36:24 +0000
(15:36 -0400)
committer
Ian Kelling
<ian@iankelling.org>
Mon, 21 Oct 2019 19:36:24 +0000
(15:36 -0400)
mail-setup
patch
|
blob
|
history
system-status
patch
|
blob
|
history
diff --git
a/mail-setup
b/mail-setup
index 8259ff8ca65a274ae814dc28cdaeed25d3ba3bce..4414c2a877c936756b8b3da3c8344bff92dbf737 100755
(executable)
--- a/
mail-setup
+++ b/
mail-setup
@@
-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
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
}
postmaster=alerts
diff --git
a/system-status
b/system-status
index c58d9cea7f6eb3efceae04e08d85c1ce386bfa22..ddb5b738c28db81d1f4320ad10200de8b4f3f773 100755
(executable)
--- a/
system-status
+++ b/
system-status
@@
-45,7
+45,10
@@
write-status() {
chars+=("MAILPING!")
fi
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
if ((qlen)); then
chars+=("q $qlen")
fi