From 662d15f4563ceca4fdb11001be49bad52b427b75 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 13 Sep 2021 14:35:51 +0200 Subject: [PATCH] remove password --- check_process | 2 -- conf/systemd.service | 2 +- manifest.json | 14 -------------- scripts/install | 7 ------- scripts/upgrade | 32 +++++++++++++++----------------- 5 files changed, 16 insertions(+), 41 deletions(-) diff --git a/check_process b/check_process index ec2cd69..3c6fe30 100644 --- a/check_process +++ b/check_process @@ -3,9 +3,7 @@ ; Manifest domain="domain.tld" path="/" - admin="john" is_public=1 - password="password" port="8095" ; Checks pkg_linter=1 diff --git a/conf/systemd.service b/conf/systemd.service index b2ab3de..f494275 100755 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -9,7 +9,7 @@ Group=__APP__ WorkingDirectory=__FINALPATH__ Environment=PATH=__ENV_PATH__ Environment=NODE_ENV=production -ExecStart=__YNH_NODE__ tiddlywiki ++languages/fr-FR mynewwiki --listen port=__PORT__ username=__ADMIN__ password=__PASSWORD__ +ExecStart=__YNH_NODE__ tiddlywiki ++languages/fr-FR mynewwiki --listen port=__PORT__ Restart=always # Sandboxing options to harden security diff --git a/manifest.json b/manifest.json index 7438d2b..8a15f0d 100644 --- a/manifest.json +++ b/manifest.json @@ -34,20 +34,6 @@ "type": "domain", "example": "domain.org" }, - { - "name": "admin", - "type": "user", - "example": "johndoe" - }, - { - "name": "password", - "type": "password", - "help": { - "en": "Using some special characters such as % may cause issues.", - "fr": "L'utilisation de certains caractères spéciaux tels que % peut causer des erreurs." - }, - "example": "Choose a password" - }, { "name": "is_public", "type": "boolean", diff --git a/scripts/install b/scripts/install index f68dd85..52b3af8 100755 --- a/scripts/install +++ b/scripts/install @@ -13,9 +13,6 @@ source /usr/share/yunohost/helpers # MANAGE SCRIPT FAILURE #================================================= -ynh_clean_setup () { - ynh_clean_check_starting -} # Exit if an error occurs during the execution of the script ynh_abort_if_errors @@ -26,8 +23,6 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url="/" is_public=$YNH_APP_ARG_IS_PUBLIC -password=$YNH_APP_ARG_PASSWORD -admin=$YNH_APP_ARG_ADMIN app=$YNH_APP_INSTANCE_NAME @@ -49,8 +44,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=1 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=admin --value=$admin -ynh_app_setting_set --app=$app --key=password --value="$password" #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/upgrade b/scripts/upgrade index d3fef9d..4a6bd02 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,8 +20,6 @@ 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) port=$(ynh_app_setting_get --app=$app --key=port) -admin=$(ynh_app_setting_get --app=$app --key=admin) -password=$(ynh_app_setting_get --app=$app --key=password) #================================================= # CHECK VERSION @@ -29,6 +27,21 @@ password=$(ynh_app_setting_get --app=$app --key=password) upgrade_type=$(ynh_check_app_version_changed) +#================================================= +# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +#================================================= +ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 + +# Backup the current version of the app +ynh_backup_before_upgrade +ynh_clean_setup () { + # restore it if the upgrade fails + ynh_restore_upgradebackup + ynh_clean_check_starting +} +# Exit if an error occurs during the execution of the script +ynh_abort_if_errors + #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= @@ -47,21 +60,6 @@ if ynh_legacy_permissions_exists; then ynh_app_setting_delete --app=$app --key=is_public fi -#================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP -#================================================= -ynh_script_progression --message="Backing up the app before upgrading (may take a while)..." --weight=1 - -# Backup the current version of the app -ynh_backup_before_upgrade -ynh_clean_setup () { - # restore it if the upgrade fails - ynh_restore_upgradebackup - ynh_clean_check_starting -} -# Exit if an error occurs during the execution of the script -ynh_abort_if_errors - #================================================= # STANDARD UPGRADE STEPS #=================================================