1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/wekan_ynh.git synced 2024-09-03 20:36:09 +02:00

Merge pull request #20 from yalh76/change_url

Change url
This commit is contained in:
yalh76 2019-03-07 19:18:11 +01:00 committed by GitHub
commit 69b0be941d
5 changed files with 10 additions and 13 deletions

View file

@ -22,7 +22,7 @@ location __PATH__
# on every applicaiton update the name of CSS and JS file is different,
# so they can be cache infinitely (here: 30 days)
# the root path MUST NOT be cached
if ($uri != '/wekan')
if ($uri != '__PATH__')
{
expires 30d;
}

View file

@ -33,6 +33,8 @@ final_path=$(ynh_app_setting_get $app final_path)
# Add settings here as needed by your application
#db_name=$(ynh_app_setting_get "$app" db_name)
#db_pwd=$(ynh_app_setting_get $app db_pwd)
db_name=$(ynh_app_setting_get $app db_name)
port=$(ynh_app_setting_get $app port)
#=================================================
# CHECK THE SYNTAX OF THE PATHS
@ -98,12 +100,8 @@ fi
ynh_print_info "Updating .env configuration..."
ynh_systemd_action --action=stop --service_name=$app --log_path="systemd"
ynh_replace_string "__NODEJS_PATH__" "$nodejs_path" "$final_path/.env"
ynh_replace_string "__DB_NAME__" "$db_name" "$final_path/.env"
ynh_replace_string "__DOMAIN_URI__" "$new_domain$new_path" "$final_path/.env"
ynh_replace_string "__PORT__" "$port" "$final_path/.env"
ynh_systemd_action --action=start --service_name=$app --log_path="systemd" --line_match="Finishing add-custom-html-before-body-end migration"
sleep 10
ynh_replace_string "$old_domain$old_path" "$new_domain$new_path" "$final_path/.env"
ynh_systemd_action --action=start --service_name=$app --log_path="systemd" --line_match="Kadira: completed instrumenting the app"
#=================================================
# GENERIC FINALISATION

View file

@ -101,6 +101,7 @@ ynh_print_info "Installing dependencies..."
ynh_print_info "Installing nodejs ..."
ynh_install_nodejs 8.15.1
ynh_use_nodejs
ynh_print_info "Installing mongodb dependencies ..."
ynh_install_app_dependencies "mongodb mongodb-server"
@ -269,8 +270,7 @@ systemctl reload nginx
# START SERVICE
#=================================================
ynh_systemd_action --action=start --service_name=$app --log_path="systemd" --line_match="Finishing add-custom-html-before-body-end migration"
sleep 10
ynh_systemd_action --action=start --service_name=$app --log_path="systemd" --line_match="Kadira: completed instrumenting the app"
#=================================================
# END OF SCRIPT

View file

@ -86,6 +86,7 @@ ynh_print_info "Reinstalling dependencies..."
# Define and install dependencies
ynh_install_nodejs 8.15.1
ynh_use_nodejs
# Install mongodb
ynh_install_app_dependencies "mongodb mongodb-server"
@ -128,8 +129,7 @@ systemctl reload nginx
# START SERVICE
#=================================================
ynh_systemd_action --action=start --service_name=$app --log_path="systemd"
sleep 10
ynh_systemd_action --action=start --service_name=$app --log_path="systemd" --line_match="Kadira: completed instrumenting the app"
#=================================================
# END OF SCRIPT

View file

@ -162,8 +162,7 @@ systemctl reload nginx
# START SERVICE
#=================================================
ynh_systemd_action --action=restart --service_name=$app --log_path="systemd"
sleep 10
ynh_systemd_action --action=restart --service_name=$app --log_path="systemd" --line_match="Kadira: completed instrumenting the app"
#=================================================
# END OF SCRIPT