variables 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. # -*- mode:sh -*-
  2. umask 022
  3. unset CDPATH
  4. export lockdir=${lockdir:-${base}/lock/}
  5. export logdir=${logdir:-${base}/log/cron/}
  6. declare -r bindir=${base}/bin
  7. declare -r queuedir=${base}/queue/
  8. declare -r scriptdir=${base}/scripts
  9. declare -r dbdir=${base}/database/ # debian
  10. declare -r exportdir=${base}/export/
  11. declare -r extoverridedir=${scriptdir}/external-overrides
  12. declare -r ftpdir=${base}/ftp
  13. declare -r indices=${ftpdir}/indices
  14. declare -r mirrordir=${base}/mirror/
  15. declare -r accepted=${queuedir}/accepted/
  16. declare -r newstage=${queuedir}/newstage/
  17. declare -r scriptsdir=${masterdir}/scripts/debian/
  18. stagedir=${lockdir}/stages
  19. declare -r unchecked=${queuedir}/unchecked/
  20. declare -r public=/srv/${functionname%%-*}.debian.org
  21. declare -r webdir=${public}/web # not in use on security
  22. declare -r exportpublic=${public}/rsync/export/
  23. declare -r overridedir=${scriptdir}/override # debian
  24. declare -r disembargo=$queuedir/unchecked-disembargo/ # from debian-security
  25. declare -r done=$queuedir/done/ # from debian-security
  26. TMPDIR=${base}/tmp
  27. PATH=${masterdir}:${PATH}
  28. # By default, add no timestamps to stage logs
  29. TIMESTAMP=false
  30. # How many days of logfiles to keep?
  31. declare -r logkeep=${logkeep:-60}
  32. declare -r HOSTNAME=$(hostname -s)
  33. # where do we want mails to go? For example log entries made with error()
  34. case ${HOSTNAME} in
  35. fasolo|seger|coccia)
  36. # Yay, ftpmaster
  37. MAILTO=${MAILTO:-"ftpmaster@debian.org"}
  38. ;;
  39. *)
  40. # Not our ftpmaster host
  41. MAILTO=${MAILTO:-"root"}
  42. ;;
  43. esac
  44. if [[ ${ARG:-none} != deploy ]]; then
  45. declare -r archs=$(dak admin a list | tr '\n' ' ')
  46. # Set the database variables
  47. eval $(dak admin config db-shell)
  48. fi
  49. ########################################################################
  50. # Lockfiles used by different parts of our scripts
  51. # Various lockfiles used by multiple cron scripts
  52. # The main dinstall lock
  53. declare -r LOCK_DAILY="${lockdir}/daily.lock"
  54. # Lock unchecked queue processing
  55. declare -r LOCK_UNCHECKED="${lockdir}/unchecked.lock"
  56. # This file is simply used to indicate to britney whether or not
  57. # the Packages file updates completed sucessfully. It's not a lock
  58. # from our point of view
  59. declare -r LOCK_BRITNEY="$lockdir/britney.lock"
  60. # Lock buildd updates
  61. declare -r LOCK_BUILDD="$lockdir/buildd.lock"
  62. # Lock changelog updates
  63. declare -r LOCK_CHANGELOG="$lockdir/changelog.lock"
  64. # If this file exists we exit immediately after the currently running
  65. # function is done
  66. declare -r LOCK_STOP="${lockdir}/archive.stop"
  67. # Lock for deploying new code
  68. declare -r LOCK_DEPLOY=${LOCK_DEPLOY:-"${lockdir}/deploy"}