summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdoalogwatch.in22
1 files changed, 10 insertions, 12 deletions
diff --git a/doalogwatch.in b/doalogwatch.in
index a70e01a..1874eb9 100755
--- a/doalogwatch.in
+++ b/doalogwatch.in
@@ -24,16 +24,15 @@ if [ -d "${warteAufFile%/*}" ]; then
echo $$ > "${warteAufFile}"
fi
-[ -r #ETCDIR#/backup.conf ] && \
- . #ETCDIR#/backup.conf
+[ -r '#ETCDIR#/backup.conf' ] && \
+ . '#ETCDIR#/backup.conf'
warten=true
-until ! ${warten}
-do
+while ${warten}; do
warten=false
- [ $(cat /proc/uptime | cut -d ' ' -f 1 | sed "s/\..*\$//") -le 300 ] && \
+ [ $(sed 's/[. ].*$//' /proc/uptime) -le 300 ] && \
warten=true
# check for currently running backups
@@ -41,12 +40,9 @@ do
grep -v "\sgrep\s" | \
grep -q "\s\(#BINDIR#/\)\?backup\s" && \
warten=true
- if [ -r #ETCDIR#/backup.conf ]
- then
- for i in 1 2
- do
- for id in "${!backups[@]}"
- do
+ if [ -r '#ETCDIR#/backup.conf' ]; then
+ for i in 1 2; do
+ for id in "${!backups[@]}"; do
[ -e "#TMPDIR#/${id}.pid" ] && \
warten=true
done
@@ -56,7 +52,9 @@ do
done
-logwatch --archives --range "between $(cat "${lmDatei}") and yesterday"
+logwatch \
+ --archives \
+ --range "between $(cat "${lmDatei}") and yesterday"
echo "${abWannNaechstesMal}" > "${lmDatei}"