diff --git a/cronjob-dehydrated b/cronjob-dehydrated index ec31e99..92b623f 100755 --- a/cronjob-dehydrated +++ b/cronjob-dehydrated @@ -1,6 +1,3 @@ #!/bin/bash -# Delay the run for 15 hours (from midnight) and then run at a random time within 3 hours after that. -sleep $(( 54000 + (RANDOM % 10800) )) - /usr/sbin/dehydrated -c >/dev/null diff --git a/cronjob-update-packages-list b/cronjob-update-packages-list index 824965d..989cc4e 100755 --- a/cronjob-update-packages-list +++ b/cronjob-update-packages-list @@ -11,19 +11,15 @@ # Create package list depending on system type. case "$ID" in - 'alpine') - apk list -I | cut -d' ' -f1 | rev | cut -d- -f3- | rev >/etc/pkglist - ;; 'debian'|'ubuntu') - dpkg-query --show --showformat='${Package}\n' >/etc/pkglist + /usr/bin/dpkg-query --show --showformat='${Package}\n' >/etc/pkglist ;; 'slackware') - slackpkg -batch=on -default_answer=y generate-template "$(hostname --short)" >/dev/null - [[ -L /etc/pkglist ]] && rm -f /etc/pkglist - ls -1 /var/log/packages/ | rev | cut -d- -f4- | rev >/etc/pkglist + /usr/sbin/slackpkg -batch=on -default_answer=y generate-template "$(hostname --short)" >/dev/null + [[ ! -e /etc/pkglist ]] && ln -sf "/etc/slackpkg/templates/$(hostname --short).template" /etc/pkglist ;; 'void') - xbps-query -l | awk '{ print $2 }' | rev | cut -d- -f2- | rev >/etc/pkglist + /usr/sbin/xbps-query -l | awk '{ print $2 }' | rev | cut -d- -f2- | rev >/etc/pkglist ;; *) printf "%s: %s\\n" "${BASH_SOURCE[0]}" "Unsupported system." >&2 diff --git a/do-backup b/do-backup index 0a8e35f..dd3f0d4 100755 --- a/do-backup +++ b/do-backup @@ -130,7 +130,7 @@ mountpoint "$BACKUP_MOUNTPOINT/" >/dev/null 2>&1 || { } # Do the backup. -ionice -c Idle nice -n 19 rsync "${RSYNC_OPTIONS[@]}" "${RSYNC_OPTIONS_VERBOSE[@]}" "${RSYNC_FILTER[@]}" "$RSYNC_SOURCE" "$BACKUP_DESTDIR" >"$RSYNC_LOG" 2>&1 +rsync "${RSYNC_OPTIONS[@]}" "${RSYNC_OPTIONS_VERBOSE[@]}" "${RSYNC_FILTER[@]}" "$RSYNC_SOURCE" "$BACKUP_DESTDIR" >"$RSYNC_LOG" 2>&1 ERR="$?" # Send a notification and mail a log if there were errors.