upgrade 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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
  11. python3 -m venv venv
  12. pip install -U open-webui
  13. open-webui serve
  14. popd
  15. chown -R "$app:www-data" "$install_dir"
  16. #=================================================
  17. # REAPPLY SYSTEM CONFIGURATION
  18. #=================================================
  19. ynh_script_progression "Upgrading system configurations related to $app..."
  20. ynh_config_add_nginx
  21. ynh_config_add_logrotate
  22. #ynh_config_add_fail2ban --logpath="/var/log/nginx/${domain}-error.log" --failregex="Regex to match into the log for a failed login"
  23. #=================================================
  24. # START SYSTEMD SERVICE
  25. #=================================================
  26. ynh_script_progression "Starting $app's systemd service..."
  27. ynh_systemctl --service="$app" --action="start"
  28. #=================================================
  29. # END OF SCRIPT
  30. #=================================================
  31. ynh_script_progression "Upgrade of $app completed"