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.

run.sh 666B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #! /usr/bin/env bash
  2. replace_var()
  3. {
  4. file="${1}"
  5. var="${2}"
  6. sed -e "s?${var}?${!var}?g" -i "${file}"
  7. }
  8. replace_vars()
  9. {
  10. file="${1}"
  11. for var in $(cat /etc/vars-vars)
  12. do
  13. replace_var "${file}" "${var}"
  14. done
  15. }
  16. replace_files()
  17. {
  18. for file in $(cat /etc/vars-files)
  19. do
  20. replace_vars "${file}"
  21. done
  22. }
  23. replace_files
  24. if [ ! -e /etc/opendkim/keys/dkim.private ]
  25. then
  26. cd /etc/opendkim/keys &&
  27. opendkim-genkey -s dkim -d "${MAIL_DOMAIN}" &&
  28. chown opendkim:opendkim dkim.private dkim.txt
  29. cd --
  30. fi
  31. sleep 5
  32. rm -f /var/run/rsyslogd.pid
  33. rm -f /var/run/opendkim/opendkim.pid
  34. service rsyslog start
  35. service opendkim start &&
  36. cat /var/log/syslog