mirror of
https://github.com/YunoHost-Apps/limesurvey_ynh.git
synced 2024-09-03 19:36:32 +02:00
Fix upload dir
This commit is contained in:
parent
4ad135cf1d
commit
dbfc1553d3
4 changed files with 6 additions and 12 deletions
|
@ -74,7 +74,6 @@ ram.runtime = "50M"
|
||||||
[resources.install_dir]
|
[resources.install_dir]
|
||||||
|
|
||||||
[resources.data_dir]
|
[resources.data_dir]
|
||||||
subdirs = ["upload"]
|
|
||||||
owner = "__APP__:rwx"
|
owner = "__APP__:rwx"
|
||||||
group = "www-data:rwx"
|
group = "www-data:rwx"
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
# Database prefix
|
# Database prefix
|
||||||
prefix=lime_
|
prefix=lime_
|
||||||
ynh_app_setting_set --app=$app --key=prefix --value=$prefix
|
ynh_app_setting_set --app="$app" --key=prefix --value="$prefix"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
|
@ -25,6 +25,8 @@ ynh_script_progression --message="Setting up source files..." --weight=1
|
||||||
# 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="$install_dir"
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
|
|
||||||
|
# Move upload directory to data_dir, with a symlink
|
||||||
|
mv "$install_dir/upload" "$data_dir"
|
||||||
ln -s "$data_dir/upload" "$install_dir/upload"
|
ln -s "$data_dir/upload" "$install_dir/upload"
|
||||||
|
|
||||||
chmod 750 "$install_dir"
|
chmod 750 "$install_dir"
|
||||||
|
|
|
@ -17,11 +17,7 @@ ynh_script_progression --message="Restoring the app main directory..." --weight=
|
||||||
|
|
||||||
ynh_restore_file --origin_path="$install_dir"
|
ynh_restore_file --origin_path="$install_dir"
|
||||||
|
|
||||||
# Update the symlink just in case
|
ynh_secure_remove "$install_dir/upload"
|
||||||
ynh_exec_warn ls -lah "$install_dir"
|
|
||||||
ynh_exec_warn ls -lah "$install_dir/upload/"
|
|
||||||
|
|
||||||
rm "$install_dir/upload"
|
|
||||||
ln -s "$data_dir/upload" "$install_dir/upload"
|
ln -s "$data_dir/upload" "$install_dir/upload"
|
||||||
|
|
||||||
chmod 750 "$install_dir"
|
chmod 750 "$install_dir"
|
||||||
|
|
|
@ -39,16 +39,13 @@ fi
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
|
|
||||||
# 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="$install_dir" --full_replace=1 --keep="plugins/ application/config/config.php"
|
ynh_setup_source --dest_dir="$install_dir" --full_replace=1 --keep="plugins/ application/config/config.php upload"
|
||||||
|
|
||||||
ln -s "$data_dir/upload" "$install_dir/upload"
|
|
||||||
|
|
||||||
chmod 750 "$install_dir"
|
chmod 750 "$install_dir"
|
||||||
chmod 750 "$install_dir/tmp"
|
|
||||||
chmod 750 "$install_dir/application/config/"
|
|
||||||
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"
|
||||||
|
|
||||||
|
# Set permissions just in case
|
||||||
chmod 750 "$data_dir"
|
chmod 750 "$data_dir"
|
||||||
chown -R "$app:www-data" "$data_dir"
|
chown -R "$app:www-data" "$data_dir"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue