summaryrefslogtreecommitdiff
path: root/app-portage/esearch/files/eupdatedb.cron
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-portage/esearch/files/eupdatedb.cron
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-portage/esearch/files/eupdatedb.cron')
-rw-r--r--app-portage/esearch/files/eupdatedb.cron32
1 files changed, 32 insertions, 0 deletions
diff --git a/app-portage/esearch/files/eupdatedb.cron b/app-portage/esearch/files/eupdatedb.cron
new file mode 100644
index 000000000000..1cf802f7b05f
--- /dev/null
+++ b/app-portage/esearch/files/eupdatedb.cron
@@ -0,0 +1,32 @@
+#! /bin/bash
+
+# The eupdatedb script _needs_ to be installed with the filename 'eupdatedb'
+# because it does things based on basename $0.
+
+# Run some script
+
+SCRIPT="/usr/sbin/eupdatedb"
+SCRIPTPREOPTS="nice -n 19"
+SCRIPTOPTS="--quiet"
+PRECOMMAND=""
+POSTCOMMAND=""
+DATE="`date +%Y%m%d`"
+LOG="/var/log/`basename ${SCRIPT}`"
+
+${PRECOMMAND}
+
+# Start logging
+echo "--- Starting ${SCRIPT} for ${DATE} ---" >> ${LOG}
+
+if [ "`${SCRIPTPREOPTS} ${SCRIPT} ${SCRIPTOPTS}`" ]
+then
+ echo "${SCRIPT}: success." >> ${LOG}
+else
+ echo "ERROR: ${SCRIPT} failed." >> ${LOG}
+fi
+
+# Cleanup tasks
+${POSTCOMMAND}
+
+# End logging
+echo "--- Ending ${SCRIPT} for ${DATE} ---" >> ${LOG}