diff --git a/manifest.toml b/manifest.toml index 915ce7d..72dbf81 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Shaarli" description.en = "Save, sort, synchronize and share web addresses" description.fr = "Sauvegarder, trier, synchroniser et partager des adresses web" -version = "0.12.2~ynh1" +version = "0.12.2~ynh2" maintainers = ["Lapineige"] @@ -16,7 +16,7 @@ admindoc = "https://shaarli.readthedocs.io/en/master/" code = "https://github.com/shaarli/Shaarli" [integration] -yunohost = ">= 11.2" +yunohost = ">= 11.2.9" architectures = "all" multi_instance = true diff --git a/scripts/install b/scripts/install index ded9798..af595d8 100644 --- a/scripts/install +++ b/scripts/install @@ -34,7 +34,7 @@ ynh_add_nginx_config # Use logrotate to manage application logfile(s) touch "$install_dir/data/log.txt" -ynh_use_logrotate "$install_dir/data/log.txt" --specific_user=$app +ynh_use_logrotate --logfile="$install_dir/data/log.txt" --specific_user=$app chown $app:www-data "$install_dir/data/log.txt" # Create a dedicated Fail2Ban config @@ -51,13 +51,13 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1 timezone=$(cat /etc/timezone) # Generate the salt -salt=$(php$phpversion -r 'echo sha1(uniqid("", true) ."_". mt_rand());') +salt=$(ynh_string_random 40) # Generate the hash with the password hash=$(echo -n "${password}${admin}${salt}" | sha1sum | awk '{print $1}') # Generate the API secret -secret=$(php${YNH_PHP_VERSION} -r "echo str_shuffle(substr(hash_hmac('sha512', uniqid('${salt}'), '${admin}'), 10, 12));") +secret=$(ynh_string_random 64) # Set default_private_links. By default, make them public if the app is public. if ynh_permission_has_user --permission=main --user=visitors diff --git a/scripts/upgrade b/scripts/upgrade index 29c7413..31947bc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -65,7 +65,7 @@ then fi chown $app:www-data "$install_dir/data/log.txt" -ynh_use_logrotate --non-append --specific_user=$app +ynh_use_logrotate --logfile="$install_dir/data/log.txt" --non-append --specific_user=$app # Create a dedicated Fail2Ban config ynh_add_fail2ban_config --logpath="$install_dir/data/log.txt" --failregex="\s-\s\s-\sLogin failed for user.*$"