1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gitlab_ynh.git synced 2024-09-03 18:36:35 +02:00
gitlab_ynh/scripts/upgrade

48 lines
1.1 KiB
Text
Raw Normal View History

2017-06-10 10:10:31 +02:00
#!/bin/bash
# Source YunoHost helpers
source /usr/share/yunohost/helpers
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
# Load common variables and helpers
source ./_common.sh
2017-06-10 10:10:31 +02:00
# See comments in install script
app=$YNH_APP_INSTANCE_NAME
# Retrieve app settings
domain=$(ynh_app_setting_get "$app" domain)
path_url=$(ynh_app_setting_get "$app" path_url)
admin=$(ynh_app_setting_get "$app" admin)
is_public=$(ynh_app_setting_get "$app" is_public)
port=$(ynh_app_setting_get "$app" web_port)
portUnicorn=$(ynh_app_setting_get "$app" unicorn_port)
2017-06-10 10:10:31 +02:00
# Modify Nginx configuration file and copy it to Nginx conf directory
config_nginx
2017-06-10 10:10:31 +02:00
create_dir
2017-06-10 10:10:31 +02:00
# Configure gitlab with gitlab.rb file
config_gitlab
2017-06-10 10:10:31 +02:00
# Add dependencies
ynh_install_app_dependencies openssh-server
2017-06-10 10:10:31 +02:00
# Update to the last version
update_src_version
2017-06-10 10:10:31 +02:00
# Update Gitlab
setup_source $architecture
2018-04-14 18:38:22 +02:00
2017-06-10 10:10:31 +02:00
# If app is public, add url to SSOWat conf as skipped_uris
if [[ $is_public -eq 1 ]]; then
# See install script
ynh_app_setting_set "$app" unprotected_uris "/"
fi
# Reload nginx service
sudo service nginx reload