diff --git a/check_process b/check_process index d5c5b3e..946bdf9 100644 --- a/check_process +++ b/check_process @@ -21,7 +21,6 @@ upgrade=1 from_commit=bd00c8e3ce43563f33fde073cf36b997c348d05c backup_restore=1 multi_instance=0 - port_already_use=0 change_url=1 ;;; Options Email= diff --git a/scripts/backup b/scripts/backup index 3aa23aa..77fc8c4 100644 --- a/scripts/backup +++ b/scripts/backup @@ -23,7 +23,6 @@ ynh_print_info --message="Loading installation settings..." app=$YNH_APP_INSTANCE_NAME final_path=$(ynh_app_setting_get --app=$app --key=final_path) -config_path=$(ynh_app_setting_get --app=$app --key=config_path) domain=$(ynh_app_setting_get --app=$app --key=domain) #================================================= @@ -53,7 +52,7 @@ ynh_backup --src_path="/etc/systemd/system/$app.service" # BACKUP CONFIG #================================================= -ynh_backup --src_path="$config_path" +ynh_backup --src_path="/home/yunohost.app/$app" #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index 5343146..bc5b1bc 100644 --- a/scripts/install +++ b/scripts/install @@ -34,7 +34,6 @@ app=$YNH_APP_INSTANCE_NAME ynh_script_progression --message="Validating installation parameters..." final_path=/var/www/$app -config_path=/home/yunohost.app/$app test ! -e "$final_path" || ynh_die --message="This path already contains a folder" # Register (book) web path @@ -45,9 +44,8 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url #================================================= ynh_script_progression --message="Storing installation settings..." -ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=path --value=$path_url -ynh_app_setting_set --app=$app --key=config_path --value=$config_path +ynh_app_setting_set --app=$app --key=domain --value=$domain +ynh_app_setting_set --app=$app --key=path --value=$path_url #================================================= # STANDARD MODIFICATIONS @@ -103,9 +101,9 @@ ynh_add_nginx_config #================================================= ynh_script_progression --message="Modifying a config file..." -mkdir -p $config_path +mkdir -p /home/yunohost.app/$app -ynh_add_config --template="../conf/config.js" --destination="$config_path/config.js" +ynh_add_config --template="../conf/config.js" --destination="/home/yunohost.app/$app/config.js" #================================================= # INSTALL THE LOUNGE @@ -137,7 +135,7 @@ ynh_script_progression --message="Securing files and directories..." # Set permissions to app files chown -R $app: $final_path -chown -R $app: $config_path +chown -R $app: /home/yunohost.app/$app #================================================= # INTEGRATE SERVICE IN YUNOHOST @@ -152,7 +150,7 @@ yunohost service add $app --description="Client Web IRC" --log="/var/log/$app/$a ynh_script_progression --message="Starting a systemd service..." # Start a systemd service -ynh_systemd_action --service_name=$app --action=start --log_path="systemd" --line_match="Available at http" +ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Available at http" #================================================= # SETUP SSOWAT diff --git a/scripts/remove b/scripts/remove index a09d08f..81a9a71 100644 --- a/scripts/remove +++ b/scripts/remove @@ -19,7 +19,6 @@ 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) -config_path=$(ynh_app_setting_get --app=$app --key=config_path) #================================================= # STANDARD REMOVE @@ -73,7 +72,7 @@ ynh_remove_nginx_config #================================================= ynh_script_progression --message="Removing the config file..." -ynh_secure_remove --file="$config_path" +ynh_secure_remove --file="/home/yunohost.app/$app" #================================================= # GENERIC FINALIZATION diff --git a/scripts/restore b/scripts/restore index f152ca4..c45d9ff 100644 --- a/scripts/restore +++ b/scripts/restore @@ -29,7 +29,6 @@ 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) -config_path=$(ynh_app_setting_get --app=$app --key=config_path) #================================================= # CHECK IF THE APP CAN BE RESTORED @@ -70,7 +69,7 @@ ynh_restore_file --origin_path="$final_path" #================================================= ynh_script_progression --message="Restoring the config path..." -ynh_restore_file --origin_path="$config_path" +ynh_restore_file --origin_path="/home/yunohost.app/$app" #================================================= # RESTORE USER RIGHTS @@ -79,7 +78,7 @@ ynh_script_progression --message="Restoring user rights..." # Restore permissions to app files chown -R $app: $final_path -chown -R $app: $config_path +chown -R $app: /home/yunohost.app/$app #================================================= # SPECIFIC RESTORATION @@ -114,7 +113,7 @@ yunohost service add $app --description="Client Web IRC" --log="/var/log/$app/$a #================================================= ynh_script_progression --message="Starting a systemd service..." -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Available at http" +ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Available at http" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 64f506b..c011556 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -139,7 +139,7 @@ fi #================================================= ynh_script_progression --message="Modifying a config file..." -ynh_add_config --template="../conf/config.js" --destination="$config_path" +ynh_add_config --template="../conf/config.js" --destination="/home/yunohost.app/$app/config.js" #================================================= # SETUP SYSTEMD @@ -160,7 +160,7 @@ ynh_script_progression --message="Securing files and directories..." # Set permissions on app files chown -R $app: $final_path -chown -R $app: $config_path +chown -R $app: /home/yunohost.app/$app #================================================= # GENERIC FINALIZATION @@ -176,7 +176,7 @@ yunohost service add $app --description="Client Web IRC" --log="/var/log/$app/$a #================================================= ynh_script_progression --message="Starting a systemd service..." -ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --line_match="Available at http" +ynh_systemd_action --service_name=$app --action=start --log_path=systemd --line_match="Available at http" #================================================= # RELOAD NGINX