Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

create_snf-server-sendmail_debian 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #!/bin/bash
  2. #
  3. # Script to create a debian package for SNFServer integrated with
  4. # sendmail.
  5. #
  6. # Usage: create_snf-server-sendmail_debian X.Y.Z
  7. #
  8. # where X.Y.Z is the version of SNFServer.
  9. #
  10. # $Id: configure.in,v 1.33 2008/02/08 15:10:17 adeniz Exp $
  11. #
  12. # Author: Alban Deniz
  13. #
  14. # Copyright (C) 2013 by MicroNeil Corporation. All rights reserved.
  15. # See www.armresearch.com for the copyright terms.
  16. #
  17. #######################################################################
  18. VERSION=$1
  19. # Temporary directory.
  20. TEMPDIR=tempDir
  21. # Output message and exit.
  22. error_exit() {
  23. echo Error running \'$1\' in directory $(pwd).
  24. exit 1
  25. }
  26. # Prepare the directory.
  27. rm -rf $TEMPDIR
  28. if [ $? -ne 0 ]
  29. then
  30. error_exit "rm -rf $TEMPDIR"
  31. fi
  32. # Copy package files.
  33. cp -dr Packages/Ubuntu/snf-server-sendmail $TEMPDIR
  34. if [ $? -ne 0 ]
  35. then
  36. error_exit "cp -dr Packages/Ubuntu/snf-server-sendmail $TEMPDIR"
  37. fi
  38. # Remove .svn directories.
  39. rm -rf $(find $TEMPDIR -name .svn -type d)
  40. if [ $? -ne 0 ]
  41. then
  42. error_exit "rm -rf $(find $TEMPDIR -name .svn -type d)"
  43. fi
  44. # Create control file.
  45. ControlContents="Section: mail
  46. Priority: optional
  47. Maintainer: support <support@armresearch.com>
  48. Package: snf-server-sendmail
  49. Version: $VERSION-1
  50. Architecture: all
  51. Depends: snf-server, sendmail
  52. Description: snf-server-sendmail integrates snf-server with sendmail.
  53. snf-server is a plug-in for an MTA (Mail Transport Agent, such as
  54. sendmail or postfix) that does spam detection and IP address
  55. scanning. snf-server-sendmail must be installed after snf-server.
  56. "
  57. echo "$ControlContents" > $TEMPDIR/DEBIAN/control
  58. if [ $? -ne 0 ]
  59. then
  60. error_exit "echo $ControlContents > $TEMPDIR/DEBIAN/control"
  61. fi
  62. # Create the package.
  63. dpkg-deb -b $TEMPDIR snf-server-sendmail_$VERSION-1_all.deb
  64. if [ $? -ne 0 ]
  65. then
  66. error_exit "dpkg-deb -b $TEMPDIR snf-server-sendmail_$VERSION-1_all.deb"
  67. exit $ERROR_EXIT
  68. fi
  69. # Success.
  70. exit 0