2017-06-10 10:10:31 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2018-12-16 23:05:12 +01:00
|
|
|
# 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)
|
2018-12-16 23:05:12 +01:00
|
|
|
port=$(ynh_app_setting_get "$app" web_port)
|
|
|
|
portUnicorn=$(ynh_app_setting_get "$app" unicorn_port)
|
2017-06-10 10:10:31 +02:00
|
|
|
|
2018-12-16 23:05:12 +01:00
|
|
|
# Modify Nginx configuration file and copy it to Nginx conf directory
|
|
|
|
config_nginx
|
2017-06-10 10:10:31 +02:00
|
|
|
|
2018-12-16 23:05:12 +01:00
|
|
|
create_dir
|
2017-06-10 10:10:31 +02:00
|
|
|
|
2018-12-16 23:05:12 +01:00
|
|
|
# Configure gitlab with gitlab.rb file
|
|
|
|
config_gitlab
|
2017-06-10 10:10:31 +02:00
|
|
|
|
2018-12-16 23:05:12 +01:00
|
|
|
# Add dependencies
|
|
|
|
ynh_install_app_dependencies openssh-server
|
2017-06-10 10:10:31 +02:00
|
|
|
|
2018-12-16 23:05:12 +01:00
|
|
|
# Update to the last version
|
|
|
|
update_src_version
|
2017-06-10 10:10:31 +02:00
|
|
|
|
2018-12-16 23:05:12 +01: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
|