From 0024945621e3f29274965ab8bffc46a1c0686211 Mon Sep 17 00:00:00 2001 From: Yadd Date: Sun, 18 Aug 2024 07:56:59 +0400 Subject: [PATCH] Fix cron --- base-no-s6/install/etc/services.d/cron/run | 14 ++++++-------- base/install/etc/services.d/cron/run | 14 ++++++-------- build-all | 7 +++++++ 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/base-no-s6/install/etc/services.d/cron/run b/base-no-s6/install/etc/services.d/cron/run index 62fa4b9..42fdbb8 100755 --- a/base-no-s6/install/etc/services.d/cron/run +++ b/base-no-s6/install/etc/services.d/cron/run @@ -5,18 +5,16 @@ touch /etc/crontab /etc/cron.*/* if test "$HANDLER_CRON" != "yes"; then rm -f /etc/cron.d/liblemonldap-ng-handler-perl -fi - -if test "$HANDLER_CRON" != "no" -a "$HANDLER_CRON" != ""; then - echo "$HANDLER_CRON www-data [ -x /usr/share/lemonldap-ng/bin/purgeLocalCache ] && /usr/share/lemonldap-ng/bin/purgeLocalCache" >/etc/cron.d/liblemonldap-ng-handler-perl + if test "$HANDLER_CRON" != "no" -a "$HANDLER_CRON" != ""; then + echo "$HANDLER_CRON www-data [ -x /usr/share/lemonldap-ng/bin/purgeLocalCache ] && /usr/share/lemonldap-ng/bin/purgeLocalCache" >/etc/cron.d/liblemonldap-ng-handler-perl + fi fi if test "$PORTAL_CRON" != "yes"; then rm -f /etc/cron.d/liblemonldap-ng-portal-perl -fi - -if test "$PORTAL_CRON" != "no" -a "$PORTAL_CRON" != ""; then - echo "$PORTAL_CRON www-data [ -x /usr/share/lemonldap-ng/bin/purgeCentralCache ] && /usr/share/lemonldap-ng/bin/purgeCentralCache" > /etc/cron.d/liblemonldap-ng-portal-perl + if test "$PORTAL_CRON" != "no" -a "$PORTAL_CRON" != ""; then + echo "$PORTAL_CRON www-data [ -x /usr/share/lemonldap-ng/bin/purgeCentralCache ] && /usr/share/lemonldap-ng/bin/purgeCentralCache" > /etc/cron.d/liblemonldap-ng-portal-perl + fi fi cron -f diff --git a/base/install/etc/services.d/cron/run b/base/install/etc/services.d/cron/run index 62fa4b9..42fdbb8 100755 --- a/base/install/etc/services.d/cron/run +++ b/base/install/etc/services.d/cron/run @@ -5,18 +5,16 @@ touch /etc/crontab /etc/cron.*/* if test "$HANDLER_CRON" != "yes"; then rm -f /etc/cron.d/liblemonldap-ng-handler-perl -fi - -if test "$HANDLER_CRON" != "no" -a "$HANDLER_CRON" != ""; then - echo "$HANDLER_CRON www-data [ -x /usr/share/lemonldap-ng/bin/purgeLocalCache ] && /usr/share/lemonldap-ng/bin/purgeLocalCache" >/etc/cron.d/liblemonldap-ng-handler-perl + if test "$HANDLER_CRON" != "no" -a "$HANDLER_CRON" != ""; then + echo "$HANDLER_CRON www-data [ -x /usr/share/lemonldap-ng/bin/purgeLocalCache ] && /usr/share/lemonldap-ng/bin/purgeLocalCache" >/etc/cron.d/liblemonldap-ng-handler-perl + fi fi if test "$PORTAL_CRON" != "yes"; then rm -f /etc/cron.d/liblemonldap-ng-portal-perl -fi - -if test "$PORTAL_CRON" != "no" -a "$PORTAL_CRON" != ""; then - echo "$PORTAL_CRON www-data [ -x /usr/share/lemonldap-ng/bin/purgeCentralCache ] && /usr/share/lemonldap-ng/bin/purgeCentralCache" > /etc/cron.d/liblemonldap-ng-portal-perl + if test "$PORTAL_CRON" != "no" -a "$PORTAL_CRON" != ""; then + echo "$PORTAL_CRON www-data [ -x /usr/share/lemonldap-ng/bin/purgeCentralCache ] && /usr/share/lemonldap-ng/bin/purgeCentralCache" > /etc/cron.d/liblemonldap-ng-portal-perl + fi fi cron -f diff --git a/build-all b/build-all index 72001dc..9dcb04f 100755 --- a/build-all +++ b/build-all @@ -7,12 +7,19 @@ LIST=${LIST:-pg base portal uwsgi-portal manager full ssoaas-fastcgi-server cron if test "$(cd base && md5sum *.patch|sort)" != "$(cd base-no-s6 && md5sum *.patch|sort)"; then echo "Base patches differ" >&2 + exit 1 fi if test "$(cd portal && md5sum *.patch|sort)" != "$(cd uwsgi-portal && md5sum *.patch|sort)"; then echo "Portal patches differ" >&2 + exit 1 fi if test "$(cd manager && md5sum *.patch|sort)" != "$(cd full && md5sum *.patch|sort)"; then echo "Manager patches differ" >&2 + exit 1 +fi +if test "`md5sum uwsgi-portal/install/etc/cont-init.d/update-nginx-portal-conf|sed -e 's/ .*$//'`" != "`md5sum portal/install/etc/cont-init.d/update-nginx-portal-conf|sed -e 's/ .*$//'`"; then + echo "Portal install differ" >&2 + exit 1 fi for i in $LIST; do