From 98f8b5dba08fafa9860c46f73bc679b86f7c8a6c Mon Sep 17 00:00:00 2001 From: Kay0u Date: Fri, 25 Oct 2019 23:26:09 +0900 Subject: [PATCH] remove sso tile --- check_process | 2 +- manifest.json | 2 +- scripts/backup | 1 - scripts/change_url | 70 ---------------------------------------------- scripts/install | 9 ++---- scripts/remove | 1 - scripts/restore | 10 ------- scripts/upgrade | 4 +-- 8 files changed, 7 insertions(+), 92 deletions(-) delete mode 100644 scripts/change_url diff --git a/check_process b/check_process index 4fc0316..b05c831 100644 --- a/check_process +++ b/check_process @@ -25,7 +25,7 @@ multi_instance=1 incorrect_path=0 port_already_use=1 - change_url=1 + change_url=0 ;;; Levels # If the level 5 (Package linter) is forced to 1. Please add justifications here. diff --git a/manifest.json b/manifest.json index 35dda9b..e1a426e 100644 --- a/manifest.json +++ b/manifest.json @@ -29,7 +29,7 @@ "arguments": { "install" : [ { - "name": "domain", + "name": "server_domain", "type": "domain", "ask": { "en": "Choose a domain for your minetest server", diff --git a/scripts/backup b/scripts/backup index 83c3eb1..65f46b9 100755 --- a/scripts/backup +++ b/scripts/backup @@ -30,7 +30,6 @@ app=$YNH_APP_INSTANCE_NAME final_path=$(ynh_app_setting_get --app=$app --key=final_path) home_path=$(ynh_app_setting_get --app=$app --key=home_path) -domain=$(ynh_app_setting_get --app=$app --key=domain) #================================================= # STANDARD BACKUP STEPS diff --git a/scripts/change_url b/scripts/change_url deleted file mode 100644 index d37a27d..0000000 --- a/scripts/change_url +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/bash - -#================================================= -# GENERIC STARTING -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - -source _common.sh -source /usr/share/yunohost/helpers - -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -old_domain=$YNH_APP_OLD_DOMAIN - -new_domain=$YNH_APP_NEW_DOMAIN - -app=$YNH_APP_INSTANCE_NAME - -#================================================= -# LOAD SETTINGS -#================================================= -ynh_print_info --message="Loading installation settings..." - -# Needed for helper "ynh_add_nginx_config" -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -home_path=$(ynh_app_setting_get --app=$app --key=home_path) - -# Add settings here as needed by your application -#db_name=$(ynh_app_setting_get --app=$app --key=db_name) -#db_pwd=$(ynh_app_setting_get --app=$app --key=db_pwd) - -#================================================= -# CHECK WHICH PARTS SHOULD BE CHANGED -#================================================= - -change_domain=0 -if [ "$old_domain" != "$new_domain" ] -then - change_domain=1 -fi - -change_path=0 - -#================================================= -# STANDARD MODIFICATIONS -#================================================= -#================================================= -# SPECIFIC MODIFICATIONS -#================================================= -ynh_print_info --message="Stop Minetest..." -ynh_systemd_action --action=restart -ynh_replace_string --match_string="$old_domain" --replace_string="$new_domain" --target_file="$home_path/.minetest/minetest.conf" - -#================================================= -# GENERIC FINALISATION -#================================================= -# RELOAD MINETEST -#================================================= -ynh_print_info --message="Reloading Minetest..." - -ynh_systemd_action --service_name=$app --action="restart" --log_path="/var/log/$app/minetest.log" - -#================================================= -# END OF SCRIPT -#================================================= - -ynh_print_info --message="Change of URL completed for $app" diff --git a/scripts/install b/scripts/install index 42771f3..723e027 100755 --- a/scripts/install +++ b/scripts/install @@ -24,7 +24,7 @@ ynh_abort_if_errors # RETRIEVE ARGUMENTS FROM THE MANIFEST #================================================= -domain=$YNH_APP_ARG_DOMAIN +server_domain=$YNH_APP_ARG_SERVER_DOMAIN is_public=$YNH_APP_ARG_IS_PUBLIC pvp=$YNH_APP_ARG_PVP creative=$YNH_APP_ARG_CREATIVE @@ -54,15 +54,12 @@ ynh_print_info --message="Validating installation parameters..." final_path=/opt/yunohost/$app test ! -e "$final_path" || ynh_die "This path already contains a folder" -# Register (book) web path -ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url - #================================================= # STORE SETTINGS FROM MANIFEST #================================================= ynh_print_info --message="Storing installation settings..." -ynh_app_setting_set --app=$app --key=domain --value=$domain +ynh_app_setting_set --app=$app --key=server_domain --value=$server_domain ynh_app_setting_set --app=$app --key=path --value=$path_url ynh_app_setting_set --app=$app --key=is_public --value=$is_public ynh_app_setting_set --app=$app --key=pvp --value=$pvp @@ -184,7 +181,7 @@ popd ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$home_path/.minetest/minetest.conf" ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$home_path/.minetest/minetest.conf" ynh_replace_string --match_string="__SERVERNAME__" --replace_string="$servername" --target_file="$home_path/.minetest/minetest.conf" -ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$home_path/.minetest/minetest.conf" +ynh_replace_string --match_string="__DOMAIN__" --replace_string="$server_domain" --target_file="$home_path/.minetest/minetest.conf" ynh_replace_string --match_string="__ANNOUNCE__" --replace_string="$is_public" --target_file="$home_path/.minetest/minetest.conf" ynh_replace_string --match_string="__PVP__" --replace_string="$pvp" --target_file="$home_path/.minetest/minetest.conf" ynh_replace_string --match_string="__CREATIVE__" --replace_string="$creative" --target_file="$home_path/.minetest/minetest.conf" diff --git a/scripts/remove b/scripts/remove index 5fa3bc7..f180063 100755 --- a/scripts/remove +++ b/scripts/remove @@ -16,7 +16,6 @@ ynh_print_info --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) port=$(ynh_app_setting_get --app=$app --key=port) final_path=$(ynh_app_setting_get --app=$app --key=final_path) home_path=$(ynh_app_setting_get --app=$app --key=home_path) diff --git a/scripts/restore b/scripts/restore index 0a1449c..79cdedc 100755 --- a/scripts/restore +++ b/scripts/restore @@ -28,20 +28,10 @@ ynh_print_info --message="Loading settings..." app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) home_path=$(ynh_app_setting_get --app=$app --key=home_path) -#================================================= -# CHECK IF THE APP CAN BE RESTORED -#================================================= -ynh_print_info --message="Validating restoration parameters..." - -ynh_webpath_available --domain=$domain --path_url=$path_url -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " - #================================================= # STANDARD RESTORATION STEPS #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 0ad4f78..57ef7e0 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -16,7 +16,7 @@ ynh_print_info --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app=$app --key=domain) +server_domain=$(ynh_app_setting_get --app=$app --key=server_domain) port=$(ynh_app_setting_get --app=$app --key=port) is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) @@ -148,7 +148,7 @@ cp ../conf/minetest.conf $home_path/.minetest/minetest.conf ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$home_path/.minetest/minetest.conf" ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="$home_path/.minetest/minetest.conf" ynh_replace_string --match_string="__SERVERNAME__" --replace_string="$servername" --target_file="$home_path/.minetest/minetest.conf" -ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$home_path/.minetest/minetest.conf" +ynh_replace_string --match_string="__DOMAIN__" --replace_string="$server_domain" --target_file="$home_path/.minetest/minetest.conf" ynh_replace_string --match_string="__ANNOUNCE__" --replace_string="$is_public" --target_file="$home_path/.minetest/minetest.conf" ynh_replace_string --match_string="__PVP__" --replace_string="$pvp" --target_file="$home_path/.minetest/minetest.conf" ynh_replace_string --match_string="__CREATIVE__" --replace_string="$creative" --target_file="$home_path/.minetest/minetest.conf"