mirror of
https://github.com/YunoHost-Apps/focalboard_ynh.git
synced 2024-09-03 18:36:19 +02:00
Fix
This commit is contained in:
parent
8fa12859b9
commit
20cefffcb3
3 changed files with 6 additions and 29 deletions
|
@ -19,7 +19,7 @@
|
|||
"name": "John doe"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.1.7"
|
||||
"yunohost": ">= 4.2.4"
|
||||
},
|
||||
"multi_instance": false,
|
||||
"services": [
|
||||
|
|
|
@ -94,6 +94,10 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
|||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path"
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R $app:$app $final_path
|
||||
chmod -R 755 $files_path
|
||||
|
||||
#=================================================
|
||||
# CREATE DIRECTORIES
|
||||
#=================================================
|
||||
|
@ -124,18 +128,6 @@ ynh_add_systemd_config
|
|||
#=================================================
|
||||
|
||||
ynh_add_config --template="../conf/config.json" --destination="$final_path/config.json"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
# SECURE FILES AND DIRECTORIES
|
||||
#=================================================
|
||||
|
||||
# Set permissions to app files
|
||||
chown -R $app:$app $final_path
|
||||
chown -R $app:$app $files_path
|
||||
#chmod -R o-rwx $final_path
|
||||
chmod -R 755 $files_path
|
||||
chmod 600 $final_path/config.json
|
||||
|
||||
#=================================================
|
||||
|
|
|
@ -72,23 +72,8 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|||
then
|
||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||
|
||||
# Create a temporary directory
|
||||
tmpdir="$(mktemp -d)"
|
||||
|
||||
# Backup the config file in the temp dir
|
||||
cp -a "$final_path/config.json" "$tmpdir/config.json"
|
||||
|
||||
# Remove the app directory securely
|
||||
ynh_secure_remove --file="$final_path"
|
||||
|
||||
# Download, check integrity, uncompress and patch the source from app.src
|
||||
ynh_setup_source --dest_dir="$final_path" #--keep="foo bar" to integrate when https://github.com/YunoHost/yunohost/pull/1200 is upstream
|
||||
|
||||
# Copy the admin saved settings from tmp directory to final path
|
||||
cp -a "$tmpdir/config.json" "$final_path/config.json"
|
||||
|
||||
# Remove the tmp directory securely
|
||||
ynh_secure_remove --file="$tmpdir"
|
||||
ynh_setup_source --dest_dir="$final_path" --keep="$final_path/config.json"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue