Fork of FusionPBX but with LDAP kinda working
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.

47 lines
2.1 KiB

  1. #!/bin/sh
  2. #Process command line options only if we haven't been processed once
  3. if [ -z "$CPU_CHECK" ]; then
  4. export script_name=`basename "$0"`
  5. ARGS=$(getopt -n '$script_name' -o h -l help,use-switch-source,use-switch-package-all,use-switch-master,use-switch-package-unofficial-arm,use-php5-package,use-system-master,no-cpu-check -- "$@")
  6. if [ $? -ne 0 ]; then
  7. error "Failed parsing options."
  8. exit 1
  9. fi
  10. export USE_SWITCH_SOURCE=false
  11. export USE_SWITCH_PACKAGE_ALL=false
  12. export USE_SWITCH_PACKAGE_UNOFFICIAL_ARM=false
  13. export USE_PHP5_PACKAGE=false
  14. export USE_SWITCH_MASTER=false
  15. export USE_SYSTEM_MASTER=false
  16. export CPU_CHECK=true
  17. HELP=false
  18. while true; do
  19. case "$1" in
  20. --use-switch-source ) export USE_SWITCH_SOURCE=true; shift ;;
  21. --use-switch-package-all ) export USE_SWITCH_PACKAGE_ALL=true; shift ;;
  22. --use-switch-master ) export USE_SWITCH_MASTER=true; shift ;;
  23. --use-system-master ) export USE_SYSTEM_MASTER=true; shift ;;
  24. --use-php5-package ) export USE_PHP5_PACKAGE=true; shift ;;
  25. --use-switch-package-unofficial-arm ) export USE_SWITCH_PACKAGE_UNOFFICIAL_ARM=true; export USE_PHP5_PACKAGE=true; shift ;;
  26. --no-cpu-check ) export CPU_CHECK=false; shift ;;
  27. -h | --help ) HELP=true; shift ;;
  28. -- ) shift; break ;;
  29. * ) break ;;
  30. esac
  31. done
  32. if [ .$HELP = .true ]; then
  33. warning "Debian installer script"
  34. warning " --use-switch-source will use freeswitch from source rather than ${green}(default:packages)"
  35. warning " --use-switch-package-all if using packages use the meta-all package"
  36. warning " --use-switch-package-unofficial-arm if your system is arm and you are using packages, use the unofficial arm repo and force php5* packages"
  37. warning " --use-php5-package use php5* packages instead of ${green}(default:php7.0)"
  38. warning " --use-switch-master will use master branch/packages for the switch instead of ${green}(default:stable)"
  39. warning " --use-system-master will use master branch/packages for the system instead of ${green}(default:stable)"
  40. warning " --no-cpu-check disable the cpu check ${green}(default:check)"
  41. exit;
  42. fi
  43. fi