1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/emailpoubelle_ynh.git synced 2024-09-03 18:26:29 +02:00
This commit is contained in:
Éric Gaspar 2023-04-06 14:36:04 +02:00
parent 9430b30396
commit 7b55d40d3d
3 changed files with 10 additions and 2 deletions

View file

@ -9,6 +9,13 @@
source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# RETRIEVE ARGUMENTS FROM THE MANIFEST
#=================================================
password=$YNH_APP_ARG_PASSWORD
ynh_app_setting_set --app=$app --key=password --value=$password
#=================================================
# STANDARD MODIFICATIONS
#=================================================

View file

@ -57,6 +57,7 @@ ynh_add_nginx_config
#=================================================
ynh_script_progression --message="Updating a configuration file..."
password=$(ynh_app_setting_get --app=$app --key=password)
ynh_add_config --template="../conf/conf-dist.php" --destination="$install_dir/conf.php"
chmod 400 "$install_dir/conf.php"

View file

@ -1,7 +1,7 @@
#!/bin/bash
source /usr/share/yunohost/helpers
final_path=$(ynh_app_setting_get emailpoubelle final_path)
install_dir=$(ynh_app_setting_get --app=$app --key=install_dir)
set -e
@ -14,7 +14,7 @@ do_pre_regen() {
# FIXME : check this file actually exists to not crash when only running this
# hook alone
sudo sed -e "s@^virtual_alias_maps\s*=\s*\(.*\)@virtual_alias_maps = hash:$final_path/var/virtual,\1@"\
sudo sed -e "s@^virtual_alias_maps\s*=\s*\(.*\)@virtual_alias_maps = hash:$install_dir/var/virtual,\1@"\
-i $postfix_main_cf
}