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 390B

1234567891011121314151617181920212223242526272829
  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. zabbix_server -f -c /etc/zabbix/zabbix_server.conf