Advertisement
Guest User

Untitled

a guest
Jan 7th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. # cat /var/lib/dpkg/info/sa-compile.postinst
  2. #!/bin/sh
  3.  
  4. set -e
  5.  
  6. sa_compile() {
  7. OWNER=$(stat -c '%U' /var/lib/spamassassin)
  8. # Compile, if rules have previously been compiled, and it's possible
  9. if [ -x /usr/bin/re2c -a -x /usr/bin/sa-compile ]; then
  10. echo "Running sa-compile (may take a long time)"
  11. su - $OWNER -c "sa-compile --quiet"
  12. fi
  13. }
  14.  
  15. if [ "$1" = "configure" ]; then
  16. sa_compile
  17. fi
  18.  
  19. if [ "$1" = "triggered" ] && [ "$2" = "perl-major-upgrade" ]; then
  20. sa_compile
  21. fi
  22.  
  23.  
  24.  
  25. # Local variables:
  26. # mode: shell-script
  27. # tab-width: 4
  28. # indent-tabs-mode: nil
  29. # end:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement