contrib/obs-mirror: redirect all output to a log file

Related: SYS#5764
Change-Id: Ie56c901877a3b0a1ad566cb243ab698f292407d5
This commit is contained in:
Oliver Smith 2021-12-17 18:42:24 +01:00 committed by laforge
parent e3aaae199f
commit 9b694744ea
2 changed files with 6 additions and 0 deletions

View File

@ -9,6 +9,9 @@
#
# See also: OS#4862
echo "Redirecting all output to: /home/pkgmirror/obs-mirror.log"
exec >"/home/pkgmirror/obs-mirror.log" 2>&1
set -e -x
SCRIPT_DIR="$(realpath "$(dirname "$(realpath "$0")")")"

View File

@ -1,5 +1,8 @@
#!/bin/sh -e
# Remove nightly archives older than one month (OS#4862)
echo "Redirecting all output to: /home/pkgmirror/rm-old-nightly-archives.log"
exec >"/home/pkgmirror/rm-old-nightly-archives.log" 2>&1
DRY=0
# Get removal date in seconds since epoch and display it