package-release.sh 967 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/sh
  2. #move to script directory so all relative paths work
  3. cd "$(dirname "$0")"
  4. #includes
  5. . ../config.sh
  6. #install dependencies
  7. pkg install --yes tiff ghostscript10-10.02.1 memcached sox
  8. #set the current working directory
  9. cwd=$(pwd)
  10. #send a message
  11. echo "Installing the FreeSWITCH package"
  12. #install the package
  13. if [ .$switch_source = ."package" ]; then
  14. pkg install --yes freeswitch
  15. fi
  16. if [ .$switch_source = ."port" ]; then
  17. #dbatch uses the defaults alternative is make config-recursive
  18. cd /usr/ports/net/freeswitch/ && make -DBATCH install clean
  19. fi
  20. #set the original working directory
  21. cd $cwd
  22. #configure system service
  23. #cp "$(dirname $0)/rc.d.freeswitch" /usr/local/etc/rc.d/freeswitch
  24. #chmod u-w,ugo+x /usr/local/etc/rc.d/freeswitch
  25. #enable the services
  26. echo 'freeswitch_enable="YES"' >> /etc/rc.conf
  27. echo 'freeswitch_flags="-nonat"' >> /etc/rc.conf
  28. echo 'freeswitch_username="www"' >> /etc/rc.conf
  29. echo 'freeswitch_groupname="www"' >> /etc/rc.conf