mirror of
https://github.com/YunoHost-Apps/paheko_ynh.git
synced 2024-09-03 19:56:22 +02:00
add directory /data if not present on older upgrades
This commit is contained in:
parent
bb9403fcf3
commit
8595bbc22e
1 changed files with 16 additions and 4 deletions
|
@ -49,7 +49,6 @@ fi
|
|||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
|
||||
#=================================================
|
||||
# REAPPLY SYSTEM CONFIGURATIONS
|
||||
#=================================================
|
||||
|
@ -68,13 +67,26 @@ chmod 644 "/etc/cron.d/$app"
|
|||
#=================================================
|
||||
# SPECIFIC UPGRADE
|
||||
#=================================================
|
||||
# add the newest config.local.php from older version
|
||||
if ynh_compare_current_package_version --comparison lt --version 1.3.1~ynh1
|
||||
then
|
||||
ynh_script_progression --message="Updating a configuration file..." --weight=5
|
||||
|
||||
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
|
||||
|
||||
# add config file if not present
|
||||
if [ ! -f "$data_dir/data/config.local.user.php" ]; then
|
||||
|
||||
if [ ! -d "$data_dir/data" ]; then
|
||||
ynh_script_progression --message="Adding a configuration file..." --weight=5
|
||||
mkdir "$data_dir/data"
|
||||
chown $app:www-data "$data_dir/data"
|
||||
fi
|
||||
|
||||
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"
|
||||
|
|
Loading…
Add table
Reference in a new issue