[Piuparts-commits] [piuparts] 10/16: cronjobs: set PATH and run scripts without absolute path
Holger Levsen
holger at layer-acht.org
Thu Apr 13 15:04:52 UTC 2017
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch develop
in repository piuparts.
commit 555a68cef7e167f5ad8b09fd6366c984e48f4fca
Author: Andreas Beckmann <anbe at debian.org>
Date: Tue Apr 11 12:58:37 2017 +0200
cronjobs: set PATH and run scripts without absolute path
Signed-off-by: Andreas Beckmann <anbe at debian.org>
Signed-off-by: Holger Levsen <holger at layer-acht.org>
---
conf/crontab-master.in | 23 +++++++++++++----------
conf/crontab-slave.in | 13 ++++++++-----
debian/changelog | 1 +
3 files changed, 22 insertions(+), 15 deletions(-)
diff --git a/conf/crontab-master.in b/conf/crontab-master.in
index 516dd6d..076b4d0 100644
--- a/conf/crontab-master.in
+++ b/conf/crontab-master.in
@@ -1,34 +1,37 @@
# m h dom mon dow (0|7=sun,1=mon) command
+# set PATH, variable substitution is not supported (PATH=$PATH:/my/bin)
+PATH=@sharedir@/piuparts/master:/usr/bin:/bin
+
#
# cleanup $HTDOCS/daily.lock
#
- at reboot @sharedir@/piuparts/master/master_cleanup
+ at reboot master_cleanup
#
# generate reports twice a day
# (dinstall runs 1|7|13|19:52, so this is long after mirror pushes...)
#
-0 0,12 * * * @sharedir@/piuparts/master/generate_daily_report
+0 0,12 * * * generate_daily_report
#
# reschedule old logs twice a day
#
-0 3,15 * * * @sharedir@/piuparts/master/reschedule_oldest_logs
+0 3,15 * * * reschedule_oldest_logs
#
# monitor for problems once a day
# - these may result in packages being retested
# - if that's not the case, run them from within generate_daily_report
#
-30 3-21/6 * * * @sharedir@/piuparts/master/detect_network_issues
-45 3-21/6 * * * @sharedir@/piuparts/master/detect_piuparts_issues
-0 22 * * * @sharedir@/piuparts/master/detect_archive_issues
-30 22 * * * @sharedir@/piuparts/master/report_untestable_packages
-0 23 * * * @sharedir@/piuparts/master/report_stale_reserved_packages
+30 3-21/6 * * * detect_network_issues
+45 3-21/6 * * * detect_piuparts_issues
+0 22 * * * detect_archive_issues
+30 22 * * * report_untestable_packages
+0 23 * * * report_stale_reserved_packages
#
# misc
#
-0 2 * * * @sharedir@/piuparts/master/prepare_backup
-55 23 * * * @sharedir@/piuparts/master/gather_bts_stats
+0 2 * * * prepare_backup
+55 23 * * * gather_bts_stats
diff --git a/conf/crontab-slave.in b/conf/crontab-slave.in
index 08e7455..b72e967 100644
--- a/conf/crontab-slave.in
+++ b/conf/crontab-slave.in
@@ -1,22 +1,25 @@
# m h dom mon dow (0|7=sun,1=mon) command
+# set PATH, variable substitution is not supported (PATH=$PATH:/my/bin)
+PATH=@sharedir@/piuparts/slave:/usr/bin:/bin
+
#
# start slave_run automatically after reboots
#
- at reboot @sharedir@/piuparts/slave/slave_cleanup ; @sharedir@/piuparts/slave/slave_run
-42 * * * * @sharedir@/piuparts/slave/slave_cleanup ; ! @sharedir@/piuparts/slave/slave_run >/dev/null 2>&1 || echo "piuparts-slave started by cron"
+ at reboot slave_cleanup ; slave_run
+42 * * * * slave_cleanup ; ! slave_run >/dev/null 2>&1 || echo "piuparts-slave started by cron"
#
# monitor slave session every hour
#
-16 * * * * @sharedir@/piuparts/slave/detect_slave_problems
+16 * * * * detect_slave_problems
#
# monitor for problems every six hours
#
-23 */6 * * * @sharedir@/piuparts/slave/detect_leftover_processes
+23 */6 * * * detect_leftover_processes
#
# monitor for cruft in the temporary directory once a day
#
-00 0 * * * @sharedir@/piuparts/slave/detect_tmp_cruft
+0 0 * * * detect_tmp_cruft
diff --git a/debian/changelog b/debian/changelog
index 51f3568..718f1fe 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -42,6 +42,7 @@ piuparts (0.77) UNRELEASED; urgency=medium
* scripts-broken-symlinks/post_install_extras_unbreak_symlinks: New script
for "fixing" some broken symlinks (e.g. by installing selected suggested
packages) in tests using --fail-on-broken-symlinks.
+ * conf/crontab-*: Set PATH and run scripts without absolute path.
* master-bin/detect_archive_issues:
- Look at failed logs older than 24 hours (48 hours previously).
- Mark logfiles for immediate recycling upon first appearance.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/piuparts/piuparts.git
More information about the Piuparts-commits
mailing list