switch.sh 960 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #!/bin/sh
  2. #move to script directory so all relative paths work
  3. cd "$(dirname "$0")"
  4. #includes
  5. . ./config.sh
  6. #install source
  7. if [ .$switch_source = .true ]; then
  8. if [ ."$switch_branch" = "master" ]; then
  9. switch/source-master.sh
  10. else
  11. switch/source-release.sh
  12. fi
  13. #copy the switch conf files to /etc/freeswitch
  14. switch/conf-copy.sh
  15. #set the file permissions
  16. switch/source-permissions.sh
  17. #systemd service
  18. switch/source-systemd.sh
  19. fi
  20. #install packages
  21. if [ .$switch_package = .true ]; then
  22. if [ ."$switch_branch" = "master" ]; then
  23. if [ .$switch_package_all = .true ]; then
  24. switch/package-master-all.sh
  25. else
  26. switch/package-master.sh
  27. fi
  28. else
  29. if [ .$switch_package_all = .true ]; then
  30. switch/package-all.sh
  31. else
  32. switch/package-release.sh
  33. fi
  34. fi
  35. #copy the switch conf files to /etc/freeswitch
  36. switch/conf-copy.sh
  37. #set the file permissions
  38. switch/package-permissions.sh
  39. #systemd service
  40. switch/package-systemd.sh
  41. fi