kamctl.ser 988 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #
  2. #
  3. # control tool for maintaining Kamailio
  4. #
  5. #===================================================================
  6. ##### ----------------------------------------------- #####
  7. ### FIFO specific variables and functions
  8. #
  9. ##### ----------------------------------------------- #####
  10. ### load CTL base
  11. #
  12. if [ -f "$MYLIBDIR/kamctl.ctlbase" ]; then
  13. . "$MYLIBDIR/kamctl.ctlbase"
  14. else
  15. mwarn "Cannot load CTL core functions '$MYLIBDIR/kamctl.ctlbase' ..."
  16. # exit -1
  17. fi
  18. #
  19. ##### ----------------------------------------------- #####
  20. ### parameters
  21. #
  22. #
  23. ##### ----------------------------------------------- #####
  24. ### functions
  25. #
  26. usage_ser() {
  27. echo
  28. mecho " -- command 'kamcmd'"
  29. echo
  30. cat <<EOF
  31. kamcmd ............................. send command through kamcmd
  32. EOF
  33. }
  34. USAGE_FUNCTIONS="$USAGE_FUNCTIONS usage_ser"
  35. ser_cmd()
  36. {
  37. mdbg "entering ser_cmd $*"
  38. if [ "$#" -lt 1 ]; then
  39. merr "kamcmd must take at least command name as parameter"
  40. exit 1
  41. fi
  42. $SERCMD "$@"
  43. }
  44. SERCTLCMD=ser_cmd