0.9.8-29.sh 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. # Hestia Control Panel upgrade script for target version 0.9.8-28
  3. #######################################################################################
  4. ####### Place additional commands below. #######
  5. #######################################################################################
  6. # Add amd64 to repositories to prevent notifications - https://goo.gl/hmsSV7
  7. if ! grep -q 'arch=amd64' /etc/apt/sources.list.d/nginx.list; then
  8. sed -i s/"deb "/"deb [arch=amd64] "/g /etc/apt/sources.list.d/nginx.list
  9. fi
  10. if ! grep -q 'arch=amd64' /etc/apt/sources.list.d/mariadb.list; then
  11. sed -i s/"deb "/"deb [arch=amd64] "/g /etc/apt/sources.list.d/mariadb.list
  12. fi
  13. # Fix named rule for AppArmor - https://goo.gl/SPqHdq
  14. if [ "$DNS_SYSTEM" = 'bind9' ] && [ ! -f /etc/apparmor.d/local/usr.sbin.named ]; then
  15. echo "/home/** rwm," >> /etc/apparmor.d/local/usr.sbin.named 2> /dev/null
  16. fi
  17. # Remove obsolete ports.conf if exists.
  18. if [ -f /usr/local/hestia/data/firewall/ports.conf ]; then
  19. rm -f /usr/local/hestia/data/firewall/ports.conf
  20. fi
  21. # Move clamav to proper location - https://goo.gl/zNuM11
  22. if [ ! -d /usr/local/hestia/web/edit/server/clamav-daemon ]; then
  23. mv /usr/local/hestia/web/edit/server/clamd /usr/local/web/edit/server/clamav-daemon
  24. fi