mirror of
https://github.com/YunoHost-Apps/galene_ynh.git
synced 2024-09-03 18:36:31 +02:00
fix
This commit is contained in:
parent
acecca2585
commit
784cb684b4
3 changed files with 7 additions and 11 deletions
|
@ -15,10 +15,8 @@ source /usr/share/yunohost/helpers
|
||||||
ynh_script_progression --message="Loading installation settings..." --weight=1
|
ynh_script_progression --message="Loading installation settings..." --weight=1
|
||||||
|
|
||||||
# Add settings here as needed by your application
|
# Add settings here as needed by your application
|
||||||
password=$(ynh_app_setting_get --app=$app --key=password)
|
|
||||||
group_name=$(ynh_app_setting_get --app=$app --key=group_name)
|
|
||||||
port_ldap=$(ynh_app_setting_get --app=$app --key=ldap_port)
|
|
||||||
key=$(ynh_app_setting_get --app=$app --key=key)
|
key=$(ynh_app_setting_get --app=$app --key=key)
|
||||||
|
password_hash=$(ynh_app_setting_get --app=$app --key=password_hash)
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
|
|
|
@ -96,6 +96,7 @@ chown -R $app:www-data "$data_dir"
|
||||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||||
|
|
||||||
password_hash=$(echo $($install_dir/galene-password-generator $password))
|
password_hash=$(echo $($install_dir/galene-password-generator $password))
|
||||||
|
ynh_app_setting_set --app=$app --key=password_hash --value="$password_hash"
|
||||||
|
|
||||||
# Configure Galène
|
# Configure Galène
|
||||||
ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json"
|
ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json"
|
||||||
|
|
|
@ -37,12 +37,6 @@ ynh_systemd_action --service_name=${app}_ldap --action="stop" --log_path="system
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||||
|
|
||||||
# If open, close direct access to $port in firewall
|
|
||||||
if yunohost firewall list | grep -q "\- $port$"
|
|
||||||
then
|
|
||||||
ynh_exec_warn_less yunohost firewall disallow TCP $port
|
|
||||||
fi
|
|
||||||
|
|
||||||
# For version 0.6~ynh1 and before
|
# For version 0.6~ynh1 and before
|
||||||
if [[ ! -d "$install_dir/live" ]]
|
if [[ ! -d "$install_dir/live" ]]
|
||||||
then
|
then
|
||||||
|
@ -114,8 +108,11 @@ fi
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Updating a configuration file..." --weight=2
|
ynh_script_progression --message="Updating a configuration file..." --weight=2
|
||||||
|
|
||||||
|
# If password_hash doesn't exist, create it
|
||||||
|
if [ -z "$password_hash" ]; then
|
||||||
password_hash=$(echo $($install_dir/galene-password-generator $password))
|
password_hash=$(echo $($install_dir/galene-password-generator $password))
|
||||||
|
ynh_app_setting_set --app=$app --key=password_hash --value="$password_hash"
|
||||||
|
fi
|
||||||
# Configure Galène
|
# Configure Galène
|
||||||
ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json"
|
ynh_add_config --template="../conf/config.json" --destination="$install_dir/live/data/config.json"
|
||||||
chmod 400 "$install_dir/live/data/config.json"
|
chmod 400 "$install_dir/live/data/config.json"
|
||||||
|
|
Loading…
Reference in a new issue