18.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/sh
  2. # runs ../kamailio with all command line arguments.
  3. # ommited options are -h -v -I -c -D -V
  4. # Copyright (C) 2007 1&1 Internet AG
  5. #
  6. # This file is part of Kamailio, a free SIP server.
  7. #
  8. # Kamailio is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation; either version 2 of the License, or
  11. # (at your option) any later version
  12. #
  13. # Kamailio is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program; if not, write to the Free Software
  20. # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  21. . include/common
  22. . include/require.sh
  23. if ! (check_kamailio); then
  24. exit 0
  25. fi ;
  26. # the config file
  27. CFG=18.cfg
  28. # set up config
  29. printf "debug=3\nrequest_route {\n ;\n}" > $CFG
  30. # start:
  31. $BIN -L $MOD_DIR -Y $RUN_DIR -P $PIDFILE -f ./$CFG -l 127.0.0.1 -n 0 -r -R -E -d -e -K -T -N 0 -b 23 -m 42 -w . -u $(id -u) -g $(id -g) -G ./pgid.out -a no -A TESTDEF > /dev/null 2>&1
  32. ret=$?
  33. sleep 1
  34. # clean up:
  35. kill_kamailio
  36. rm $CFG
  37. rm -f ./pid.out
  38. rm -f ./pgid.out
  39. exit $ret