Compare commits

..

No commits in common. "3e51c233407ced532bc053694f38258d4fd57a3e" and "a7e218c666cd30037950cad517e25517b92eb88d" have entirely different histories.

3 changed files with 5 additions and 12 deletions

View file

@ -1,6 +1,3 @@
#!/bin/bash #!/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 /usr/sbin/dehydrated -c >/dev/null

View file

@ -11,19 +11,15 @@
# Create package list depending on system type. # Create package list depending on system type.
case "$ID" in case "$ID" in
'alpine')
apk list -I | cut -d' ' -f1 | rev | cut -d- -f3- | rev >/etc/pkglist
;;
'debian'|'ubuntu') 'debian'|'ubuntu')
dpkg-query --show --showformat='${Package}\n' >/etc/pkglist /usr/bin/dpkg-query --show --showformat='${Package}\n' >/etc/pkglist
;; ;;
'slackware') 'slackware')
slackpkg -batch=on -default_answer=y generate-template "$(hostname --short)" >/dev/null /usr/sbin/slackpkg -batch=on -default_answer=y generate-template "$(hostname --short)" >/dev/null
[[ -L /etc/pkglist ]] && rm -f /etc/pkglist [[ ! -e /etc/pkglist ]] && ln -sf "/etc/slackpkg/templates/$(hostname --short).template" /etc/pkglist
ls -1 /var/log/packages/ | rev | cut -d- -f4- | rev >/etc/pkglist
;; ;;
'void') '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 printf "%s: %s\\n" "${BASH_SOURCE[0]}" "Unsupported system." >&2

View file

@ -130,7 +130,7 @@ mountpoint "$BACKUP_MOUNTPOINT/" >/dev/null 2>&1 || {
} }
# Do the backup. # 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="$?" ERR="$?"
# Send a notification and mail a log if there were errors. # Send a notification and mail a log if there were errors.