aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2021-12-17 18:42:24 +0100
committerlaforge <laforge@osmocom.org>2021-12-20 13:35:19 +0000
commit9b694744eaa2bbf2ee967adb94b972187cdc61ad (patch)
tree206c37da4a52565fbd237b4782a5b8cf05570d71
parente3aaae199f007b9f583856a392a6369c5effe59a (diff)
contrib/obs-mirror: redirect all output to a log file
-rwxr-xr-xcontrib/obs-mirror/obs-mirror.sh3
-rwxr-xr-xcontrib/obs-mirror/rm-old-nightly-archives.sh3
2 files changed, 6 insertions, 0 deletions
diff --git a/contrib/obs-mirror/obs-mirror.sh b/contrib/obs-mirror/obs-mirror.sh
index 6ac3484..529aea1 100755
--- a/contrib/obs-mirror/obs-mirror.sh
+++ b/contrib/obs-mirror/obs-mirror.sh
@@ -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")")")"
diff --git a/contrib/obs-mirror/rm-old-nightly-archives.sh b/contrib/obs-mirror/rm-old-nightly-archives.sh
index 3a5f276..e28bce1 100755
--- a/contrib/obs-mirror/rm-old-nightly-archives.sh
+++ b/contrib/obs-mirror/rm-old-nightly-archives.sh
@@ -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