change_url 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/bin/bash
  2. #=================================================
  3. # GENERIC STARTING
  4. #=================================================
  5. # IMPORT GENERIC HELPERS
  6. #=================================================
  7. source _common.sh
  8. source /usr/share/yunohost/helpers
  9. #=================================================
  10. # STANDARD MODIFICATIONS
  11. #=================================================
  12. # STOP SYSTEMD SERVICE
  13. #=================================================
  14. ynh_script_progression --message="Stopping a systemd service..." --weight=1
  15. ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
  16. #=================================================
  17. # MODIFY URL IN NGINX CONF
  18. #=================================================
  19. ynh_script_progression --message="Updating NGINX web server configuration..." --weight=1
  20. ynh_change_url_nginx_config
  21. #=================================================
  22. # GENERIC FINALISATION
  23. #=================================================
  24. # START SYSTEMD SERVICE
  25. #=================================================
  26. ynh_script_progression --message="Starting a systemd service..." --weight=1
  27. ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
  28. #=================================================
  29. # END OF SCRIPT
  30. #=================================================
  31. ynh_script_progression --message="Change of URL completed for $app" --last