postinst 692 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. set -e
  3. if [ "$1" != "configure" ]; then
  4. exit 0
  5. fi
  6. # Run triggers below only on updates
  7. if [ ! -e "/usr/local/hestia/data/users/admin" ]; then
  8. exit
  9. fi
  10. ###############################################################
  11. # Initialize functions/variables #
  12. ###############################################################
  13. # Load upgrade functions and variables
  14. source /usr/local/hestia/func/main.sh
  15. source /usr/local/hestia/func/upgrade.sh
  16. source /usr/local/hestia/conf/hestia.conf
  17. source /usr/local/hestia/install/upgrade/upgrade.conf
  18. # Restart hestia service
  19. if [ -f "/etc/init.d/hestia" ]; then
  20. systemctl restart hestia > /dev/null 2>&1
  21. fi