diff --git a/manifest.json b/manifest.json
index 5256e4a..57954fd 100644
--- a/manifest.json
+++ b/manifest.json
@@ -3,10 +3,10 @@
"id": "librespeed",
"packaging_format": 1,
"description": {
- "en": "This is a very lightweight Speedtest implemented in Javascript, using XMLHttpRequest and Web Workers.",
- "fr": "Test de vitesse de connexion très léger implémenté en Javascript, utilisant XMLHttpRequest et Web Workers."
+ "en": "Very lightweight Speedtest.",
+ "fr": "Test de vitesse de connexion très léger."
},
- "version": "1.0~ynh1",
+ "version": "5.2.4~ynh1",
"url": "https://librespeed.org/",
"upstream": {
"license": "GPL-3.0",
@@ -56,6 +56,15 @@
"fr": "Ce mot de passe permet d'accéder aux statistiques des tests"
},
"example": "Choose a password"
+ },
+ {
+ "name": "mail",
+ "type": "string",
+ "help": {
+ "en": "Email address to contact for stats deletion requests",
+ "fr": "Couriel à contacter pour demander une suppression des statistiques"
+ },
+ "example": "webmaster@example.com"
}
]
}
diff --git a/scripts/install b/scripts/install
index ac0a9e0..64d1e7c 100755
--- a/scripts/install
+++ b/scripts/install
@@ -28,6 +28,7 @@ domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH
is_public=$YNH_APP_ARG_IS_PUBLIC
password=$YNH_APP_ARG_PASSWORD
+mail=$YNH_APP_ARG_MAIL
### If it's a multi-instance app, meaning it can be installed several times independently
### The id of the app as stated in the manifest is available as $YNH_APP_ID
@@ -119,8 +120,6 @@ ynh_setup_source --dest_dir="$final_path"
# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder -
# this will be treated as a security issue.
-#mv $final_path/'example-singleServer-full.html' "$final_path/index.html"
-
chmod 750 "$final_path"
chown -R $app:www-data $final_path
chmod o-rwx $final_path
@@ -163,14 +162,17 @@ ynh_mysql_connect_as --user="$db_name" --password="$db_pwd" --database="$db_name
#=================================================
ynh_script_progression --message="Configuring LibreSpeed..."
-rc_conf="$final_path/results/telemetry_settings.php"
+conf_telemetry="$final_path/results/telemetry_settings.php"
+conf_index="$final_path/example-singleServer-full.html"
-ynh_replace_string --match_string="stats_password = 'PASSWORD'" --replace_string="stats_password = '$password'" --target_file="$rc_conf"
-ynh_replace_string --match_string="MySql_username = 'USERNAME'" --replace_string="MySql_username = '$db_user'" --target_file="$rc_conf"
-ynh_replace_string --match_string="MySql_password = 'PASSWORD'" --replace_string="MySql_password = '$db_pwd'" --target_file="$rc_conf"
-ynh_replace_string --match_string="MySql_databasename = 'DB_NAME'" --replace_string="MySql_databasename = '$db_name'" --target_file="$rc_conf"
-ynh_replace_string --match_string="MySql_hostname = 'DB_HOSTNAME'" --replace_string="MySql_hostname = 'localhost'" --target_file="$rc_conf"
-ynh_replace_string --match_string="enable_id_obfuscation = false" --replace_string="enable_id_obfuscation = true" --target_file="$rc_conf"
+ynh_replace_string --match_string="stats_password = 'PASSWORD'" --replace_string="stats_password = '$password'" --target_file="$conf_telemetry"
+ynh_replace_string --match_string="MySql_username = 'USERNAME'" --replace_string="MySql_username = '$db_user'" --target_file="$conf_telemetry"
+ynh_replace_string --match_string="MySql_password = 'PASSWORD'" --replace_string="MySql_password = '$db_pwd'" --target_file="$conf_telemetry"
+ynh_replace_string --match_string="MySql_databasename = 'DB_NAME'" --replace_string="MySql_databasename = '$db_name'" --target_file="$conf_telemetry"
+ynh_replace_string --match_string="MySql_hostname = 'DB_HOSTNAME'" --replace_string="MySql_hostname = 'localhost'" --target_file="$conf_telemetry"
+ynh_replace_string --match_string="enable_id_obfuscation = false" --replace_string="enable_id_obfuscation = true" --target_file="$conf_telemetry"
+
+ynh_replace_string --match_string='TO BE FILLED BY DEVELOPER.' --replace_string=''$mail'.' --target_file="$conf_index"
#=================================================
# GENERIC FINALIZATION