mirror of
https://github.com/YunoHost-Apps/paheko_ynh.git
synced 2024-09-03 19:56:22 +02:00
try add file and line to read /data/config.local.user.php
This commit is contained in:
parent
d9d033e574
commit
433b3d2bfd
1 changed files with 21 additions and 17 deletions
|
@ -29,6 +29,27 @@ if [ -z "${secret_key:-}" ]; then
|
||||||
ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key
|
ynh_app_setting_set --app=$app --key=secret_key --value=$secret_key
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# ADD SPECIFIC FILE IF NEEDED
|
||||||
|
#=================================================
|
||||||
|
|
||||||
|
# first add config file if not present
|
||||||
|
if [ ! -f "$data_dir/data/config.local.user.php" ]; then
|
||||||
|
|
||||||
|
ynh_script_progression --message="Adding a configuration file..." --weight=5
|
||||||
|
|
||||||
|
ynh_script_progression --message=" files..." --weight=5
|
||||||
|
ynh_add_config --template="config.local.user.php" --destination="$data_dir/data/config.local.user.php"
|
||||||
|
chmod 650 "$data_dir/data/config.local.user.php"
|
||||||
|
chown $app:$app "$data_dir/data/config.local.user.php"
|
||||||
|
echo'
|
||||||
|
/**
|
||||||
|
* Chemin vers le fichier pour des configurations personnelles
|
||||||
|
* qui ne sera pas écraser lors des mises à jour.
|
||||||
|
*/
|
||||||
|
require '$data_dir/data/config.local.user.php';' >> $install_dir/config.local.php
|
||||||
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -41,17 +62,6 @@ then
|
||||||
ynh_setup_source --dest_dir="$install_dir" --keep="config.local.php data/plugins"
|
ynh_setup_source --dest_dir="$install_dir" --keep="config.local.php data/plugins"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -f "$data_dir/data/config.local.user.php" ]; then
|
|
||||||
ynh_add_config --template="config.local.user.php" --destination="$data_dir/data/config.local.user.php"
|
|
||||||
chmod 650 "$data_dir/data/config.local.user.php"
|
|
||||||
chown $app:$app "$data_dir/data/config.local.user.php"
|
|
||||||
echo'
|
|
||||||
/**
|
|
||||||
* Chemin vers le fichier pour des configurations personnelles
|
|
||||||
* qui ne sera pas écraser lors des mises à jour.
|
|
||||||
*/
|
|
||||||
require "$data_dir/data/config.local.user.php";' >> $install_dir/config.local.php
|
|
||||||
fi
|
|
||||||
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
|
@ -75,12 +85,6 @@ chmod 644 "/etc/cron.d/$app"
|
||||||
# SPECIFIC UPGRADE
|
# SPECIFIC UPGRADE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
if ynh_compare_current_package_version --comparison lt --version 1.3.1~ynh1
|
|
||||||
then
|
|
||||||
ynh_add_config --template="config.local.php" --destination="$install_dir/config.local.php"
|
|
||||||
chmod 650 "$install_dir/config.local.php"
|
|
||||||
chown $app:$app "$install_dir/config.local.php"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue