1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ulogger_ynh.git synced 2024-10-01 13:34:45 +02:00

error in curl link,password strength working,correction in checksum link upgrade script

This commit is contained in:
anmol26s 2017-10-22 20:50:41 +05:30
parent a5a5a32598
commit 70535c3cae
2 changed files with 6 additions and 5 deletions

View file

@ -25,7 +25,7 @@ path_url=$YNH_APP_ARG_PATH
admin=$YNH_APP_ARG_ADMIN
is_public=$YNH_APP_ARG_IS_PUBLIC
language=$YNH_APP_ARG_LANGUAGE
admin_password=$(openssl passwd -1 -salt xyz $YNH_APP_ARG_PASSWORD)
password=$YNH_APP_ARG_PASSWORD
# This is 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
@ -55,8 +55,9 @@ ynh_webpath_available $domain $path_url
ynh_webpath_register $app $domain $path_url
# Check password strength
[[ ${#admin_password} -gt 6 ]] || ynh_die \
[[ ${#password} -gt 6 ]] || ynh_die \
"The password is too weak, it must be longer than 6 characters"
admin_password=$(openssl passwd -1 -salt xyz $password)
#=================================================
# STORE SETTINGS FROM MANIFEST
@ -139,7 +140,7 @@ yunohost app ssowatconf
systemctl reload nginx
# Installation with curl
curl --data "command=setup" https://monica.datamol.org/scripts/setup.php
curl --data "command=setup" https://$domain$path_url/scripts/setup.php
#Add the admin account to the database
ynh_mysql_connect_as "$db_name" "$db_pwd" "$db_name" < "../conf/admin.sql"
#Disable setup for security

View file

@ -99,9 +99,9 @@ ynh_system_user_create $app
#=================================================
# Verify the checksum and backup the file if it's different
ynh_backup_if_checksum_is_different "$final_path/CONFIG_FILE"
ynh_backup_if_checksum_is_different "$final_path/conf.php"
# Recalculate and store the config file checksum into the app settings
ynh_store_file_checksum "$final_path/CONFIG_FILE"
ynh_store_file_checksum "$final_path/config.php"
#=================================================