diff --git a/conf/nginx.conf b/conf/nginx.conf index 55e8ecd..bc145c9 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,9 +1,5 @@ location __PATH__ { - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - proxy_pass http://127.0.0.1:__PORT__; proxy_set_header Host $host; diff --git a/manifest.json b/manifest.json index 40fe531..a0eeeb2 100644 --- a/manifest.json +++ b/manifest.json @@ -3,8 +3,8 @@ "id": "armadietto", "packaging_format": 1, "description": { - "en": "A remoteStorage server written for Node.js.", - "fr": "Un serveur remoteStorage écrit pour node.js." + "en": "RemoteStorage server written for node.js", + "fr": "Serveur remoteStorage écrit pour node.js" }, "version": "0.0.2~ynh6", "url": "https://github.com/remotestorage/armadietto", @@ -32,12 +32,6 @@ "name": "domain", "type": "domain" }, - { - "name": "path", - "type": "path", - "example": "/", - "default": "/" - }, { "name": "is_public", "type": "boolean", diff --git a/scripts/install b/scripts/install index c3ea003..ec6491c 100755 --- a/scripts/install +++ b/scripts/install @@ -25,7 +25,7 @@ ynh_abort_if_errors #================================================= domain=$YNH_APP_ARG_DOMAIN -path_url=$YNH_APP_ARG_PATH +path_url="/" is_public=$YNH_APP_ARG_IS_PUBLIC is_signup=$YNH_APP_ARG_IS_SIGNUP @@ -43,11 +43,6 @@ final_path=/opt/yunohost/$app test ! -e "$final_path" || ynh_die --message="This path already contains a folder" -# Only on / directory -if [ "$path_url" != "/" ]; then - ynh_die "Only / is allowed" -fi - # Register (book) web path ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url @@ -58,7 +53,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=final_path --value=final_path ynh_app_setting_set --app=$app --key=is_signup --value=$is_signup ynh_app_setting_set --app=$app --key=datadir --value=$datadir @@ -86,7 +80,7 @@ ynh_use_nodejs #================================================= ynh_script_progression --message="Setting up and create final app path..." --weight=1 -ynh_app_setting_set $app final_path $final_path +ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Create final_path mkdir -p "$final_path" diff --git a/scripts/remove b/scripts/remove index c9da9b2..beec3c8 100755 --- a/scripts/remove +++ b/scripts/remove @@ -77,7 +77,6 @@ ynh_script_progression --message="Removing NGINX web server configuration..." -- # Remove the dedicated NGINX config ynh_remove_nginx_config - #================================================= # REMOVE DEPENDENCIES #================================================= @@ -85,34 +84,6 @@ ynh_script_progression --message="Removing dependencies..." --weight=2 ynh_remove_nodejs --nodejs_version=$NODEJS_VERSION -#================================================= -# CLOSE A PORT -#================================================= - -if yunohost firewall list | grep -q "\- $port$" -then - ynh_script_progression --message="Closing port $port..." --weight=1 - ynh_exec_warn_less yunohost firewall disallow TCP $port -fi - -#================================================= -# REMOVE FAIL2BAN CONFIGURATION -#================================================= -# ynh_script_progression --message="Removing Fail2ban configuration..." --weight=1 - -# Remove the dedicated Fail2Ban config -# ynh_remove_fail2ban_config - -#================================================= -# SPECIFIC REMOVE -#================================================= -# REMOVE VARIOUS FILES -#================================================= -ynh_script_progression --message="Removing various files..." --weight=1 - -# Remove a cron file -# ynh_secure_remove --file="" - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index d825274..3f33626 100755 --- a/scripts/restore +++ b/scripts/restore @@ -114,7 +114,8 @@ ynh_script_progression --message="Secure files and directories" --weight=1 # Set permissions to app files chown -R $app:$app "$final_path" -chmod 0700 $datadir && chown $app:$app $datadir +chmod 0700 $datadir +chown $app:$app $datadir #================================================= # INTEGRATE SERVICE IN YUNOHOST diff --git a/scripts/upgrade b/scripts/upgrade index a406661..cf847ee 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -29,13 +29,6 @@ ynh_script_progression --message="Checking version..." --weight=1 upgrade_type=$(ynh_check_app_version_changed) -### This helper will compare the version of the currently installed app and the version of the upstream package. -### $upgrade_type can have 2 different values -### - UPGRADE_APP if the upstream app version has changed -### - UPGRADE_PACKAGE if only the YunoHost package has changed -### ynh_check_app_version_changed will stop the upgrade if the app is up to date. -### UPGRADE_APP should be used to upgrade the core app only if there's an upgrade to do. - #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -129,6 +122,7 @@ chown $app:$app "$final_path/config.yml" #================================================= # CREATE DATA DIRECTORY #================================================= + if [ -z "$datadir" ]; then ynh_script_progression --message="Creating a data directory..." --weight=1