1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/moncycle_ynh.git synced 2024-09-03 19:46:16 +02:00

Fix version.json upgrade

This commit is contained in:
Limezy 2024-02-21 12:10:19 +07:00
parent 2e485ceba5
commit 50d539ee4e
2 changed files with 2 additions and 3 deletions

View file

@ -65,12 +65,10 @@ chmod 644 "/etc/cron.d/$app"
ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_add_config --template="../conf/config.php" --destination="$install_dir/config.php" ynh_add_config --template="../conf/config.php" --destination="$install_dir/config.php"
chmod 400 "$install_dir/config.php" chmod 400 "$install_dir/config.php"
chown $app:$app "$install_dir/config.php" chown $app:$app "$install_dir/config.php"
ynh_add_config --template="../conf/version.json" --destination="$install_dir/api/version.json" ynh_add_config --template="../conf/version.json" --destination="$install_dir/api/version.json"
chmod 655 "$install_dir/api/version.json" chmod 655 "$install_dir/api/version.json"
chown $app:www-data "$install_dir/api/version.json" chown $app:www-data "$install_dir/api/version.json"

View file

@ -113,8 +113,9 @@ ynh_add_config --template="../conf/config.php" --destination="$install_dir/confi
chmod 400 "$install_dir/config.php" chmod 400 "$install_dir/config.php"
chown $app:$app "$install_dir/config.php" chown $app:$app "$install_dir/config.php"
# Remove old version file and replace it
ynh_secure_remove --file="$install_dir/api/version.json"
ynh_add_config --template="../conf/version.json" --destination="$install_dir/api/version.json" ynh_add_config --template="../conf/version.json" --destination="$install_dir/api/version.json"
chmod 655 "$install_dir/api/version.json" chmod 655 "$install_dir/api/version.json"
chown $app:www-data "$install_dir/api/version.json" chown $app:www-data "$install_dir/api/version.json"