diff --git a/check_process b/check_process index bd8f9d3..2be137b 100644 --- a/check_process +++ b/check_process @@ -12,7 +12,7 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=647357b164acab3cf5a908e8a51371fa09a6a7b3 + upgrade=1 from_commit=f86e97b3bf963a15af911f78a9333bdee0b0f41d backup_restore=1 multi_instance=1 change_url=1 @@ -20,6 +20,6 @@ Email= Notification=none ;;; Upgrade options - ; commit=647357b164acab3cf5a908e8a51371fa09a6a7b3 - name=2021-05-06 - manifest_arg=domain=DOMAIN&path=PATH&user=USER&is_public=1& + ; commit=f86e97b3bf963a15af911f78a9333bdee0b0f41d + name=Update check_process + manifest_arg=domain=DOMAIN&path=PATH&user=package_checker&is_public=1& diff --git a/conf/nginx.conf b/conf/nginx.conf index 64fc3fe..18183c5 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,10 +4,6 @@ location __PATH__/ { # Path to source alias __FINALPATH__/ ; - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - index index.php; try_files $uri $uri/ /owntracks/index.php?$args; diff --git a/manifest.json b/manifest.json index eac443c..86f0173 100644 --- a/manifest.json +++ b/manifest.json @@ -20,7 +20,7 @@ "url": "https://github.com/tituspijean/owntracks_ynh" }, "requirements": { - "yunohost": ">= 4.2.0" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ @@ -31,8 +31,7 @@ "arguments": { "install": [{ "name": "domain", - "type": "domain", - "example": "example.com" + "type": "domain" }, { "name": "path", @@ -44,9 +43,9 @@ "name": "user", "type": "user", "ask": { - "en": "Choose an user for Owntracks", - "fr": "Choisissez un utilisateur pour Owntracks" - }, + "en": "Choose a user", + "fr": "Choisissez un utilisateur" + }, "help": { "en": "Mandatory if the app is set to public. This user's traces will be displayed to visitors.", "fr": "Obligatoire si l'app est publique. Les traces de cet utilisateur seront montrées aux visiteurs." diff --git a/scripts/backup b/scripts/backup index d57362f..90b4ef5 100644 --- a/scripts/backup +++ b/scripts/backup @@ -40,7 +40,6 @@ ynh_print_info --message="Declaring files to be backed up..." ynh_backup --src_path="$final_path" - #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= diff --git a/scripts/install b/scripts/install index add99f3..8a715fa 100644 --- a/scripts/install +++ b/scripts/install @@ -113,9 +113,13 @@ ynh_mysql_connect_as $app $db_pwd $db_name < "$final_path/sql/schema.sql" #================================================= # MODIFY A CONFIG FILE #================================================= +ynh_script_progression --message="Adding a configuration file..." ynh_add_config --template="../conf/config.inc.php" --destination="$final_path/config.inc.php" +chmod 400 "$final_path/config.inc.php" +chown $app:$app "$final_path/config.inc.php" + #================================================= # SETUP PERMISSIONS #================================================= diff --git a/scripts/restore b/scripts/restore index 59eb08f..849c408 100644 --- a/scripts/restore +++ b/scripts/restore @@ -36,10 +36,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Validating restoration parameters..." -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS @@ -68,13 +65,6 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" -#================================================= -# RESTORE USER RIGHTS -#================================================= - -# Restore permissions on app files -chown -R $app:www-data $final_path - #================================================= # RESTORE THE PHP-FPM CONFIGURATION #=================================================