upgrade 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/bin/bash
  2. #=================================================
  3. # IMPORT GENERIC HELPERS
  4. #=================================================
  5. source _common.sh
  6. source /usr/share/yunohost/helpers
  7. #=================================================
  8. # DOWNLOAD, CHECK AND UNPACK SOURCE
  9. #=================================================
  10. pushd $install_dir
  11. ynh_exec_as_app $install_dir/pip install -U open-webui
  12. popd
  13. chown -R "$app:www-data" "$install_dir"
  14. #=================================================
  15. # REAPPLY SYSTEM CONFIGURATION
  16. #=================================================
  17. ynh_script_progression "Upgrading system configurations related to $app..."
  18. ynh_config_add_nginx
  19. ynh_config_add_logrotate
  20. #ynh_config_add_fail2ban --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login"
  21. #=================================================
  22. # START SYSTEMD SERVICE
  23. #=================================================
  24. ynh_script_progression "Starting $app's systemd service..."
  25. ynh_systemctl --service="$app" --action="start"
  26. #=================================================
  27. # END OF SCRIPT
  28. #=================================================
  29. ynh_script_progression "Upgrade of $app completed"