fork 0k-charms
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
514 B

  1. #!/bin/bash
  2. ## Should be executable N time in a row with same result.
  3. set -e
  4. cron_config_hash() {
  5. debug "Adding config hash to enable recreating upon config change."
  6. config_hash=$({
  7. find "$SERVICE_CONFIGSTORE/etc/cron"{,.hourly,.weekly,.daily,.monthly} \
  8. -type f -exec md5sum {} \;
  9. } | md5_compat) || exit 1
  10. init-config-add "
  11. $MASTER_BASE_SERVICE_NAME:
  12. labels:
  13. - compose.config_hash=$config_hash
  14. "
  15. }
  16. cron_config_hash || exit 1