require 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # Copyright (C) 2008 1&1 Internet AG
  2. #
  3. # This file is part of kamailio, a free SIP server.
  4. #
  5. # kamailio is free software; you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation; either version 2 of the License, or
  8. # (at your option) any later version
  9. #
  10. # kamailio is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program; if not, write to the Free Software
  17. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  18. source include/common
  19. function check_kamailio() {
  20. if ! (test -e $BIN) ; then
  21. echo "kamailio not found, not run"
  22. return 1
  23. fi;
  24. return 0
  25. }
  26. function check_module() {
  27. if [ $# -ne 1 ]; then
  28. echo "wrong number of params in check_module()"
  29. return 1
  30. fi
  31. if ! (test -e $SRC_DIR/modules/$1/$1.so) ; then
  32. echo "$SRC_DIR/modules/$1/$1.so not found, not run"
  33. return 1
  34. fi;
  35. return 0
  36. }
  37. function check_netcat() {
  38. if ! ( which nc > /dev/null ); then
  39. echo "netcat not found, not run"
  40. return 1
  41. fi;
  42. return 0
  43. }
  44. function check_sipp() {
  45. if ! ( which sipp > /dev/null ); then
  46. echo "sipp not found, not run"
  47. return 1
  48. fi;
  49. return 0
  50. }
  51. function check_sipsak() {
  52. if ! ( which sipsak > /dev/null ); then
  53. echo "sipsak not found, not run"
  54. return 1
  55. fi;
  56. return 0
  57. }