mirror of
https://github.com/YunoHost-Apps/chuwiki_ynh.git
synced 2024-09-03 18:16:18 +02:00
set relative path for --keep opt
This commit is contained in:
parent
5099a1c227
commit
0056f100ed
2 changed files with 3 additions and 12 deletions
|
@ -23,12 +23,12 @@
|
||||||
"url": "https://stylix58.netlify.app/"
|
"url": "https://stylix58.netlify.app/"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.2.4"
|
"yunohost": ">= 11.0.9"
|
||||||
},
|
},
|
||||||
"multi_instance": true,
|
"multi_instance": true,
|
||||||
"services": [
|
"services": [
|
||||||
"nginx",
|
"nginx",
|
||||||
"php7.3-fpm"
|
"php7.4-fpm"
|
||||||
],
|
],
|
||||||
"arguments": {
|
"arguments": {
|
||||||
"install" : [
|
"install" : [
|
||||||
|
|
|
@ -75,18 +75,9 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
|
|
||||||
# Create a temporary directory
|
|
||||||
tmpdir="$(mktemp -d)"
|
|
||||||
cp -a "$final_path/configuration.ini" "$tmpdir/configuration.ini"
|
|
||||||
|
|
||||||
ynh_secure_remove --file="$final_path"
|
ynh_secure_remove --file="$final_path"
|
||||||
#Download, check integrity, uncompress and patch the source from app.src
|
#Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$final_path" #--keep="$final_path/configuration.ini"
|
ynh_setup_source --dest_dir="$final_path" --keep="configuration.ini"
|
||||||
|
|
||||||
# Copy the admin saved settings from tmp directory to final config path
|
|
||||||
cp -a "$tmpdir/configuration.ini" "$final_path/configuration.ini"
|
|
||||||
# Remove the tmp directory securely
|
|
||||||
ynh_secure_remove --file="$tmpdir"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chmod 750 "$final_path"
|
chmod 750 "$final_path"
|
||||||
|
|
Loading…
Add table
Reference in a new issue