1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/limesurvey_ynh.git synced 2024-09-03 19:36:32 +02:00

[fix] Avoid twice upload dir

This commit is contained in:
ljf 2022-01-17 02:25:12 +01:00
parent 4fc3a6ce4d
commit 88c286f140
3 changed files with 4 additions and 0 deletions

View file

@ -123,6 +123,7 @@ mkdir -p $datadir
rmdir $datadir && mv "$final_path/upload" $datadir || true rmdir $datadir && mv "$final_path/upload" $datadir || true
chown -R $app:www-data "$datadir" chown -R $app:www-data "$datadir"
chmod -R o-rwx "$datadir" chmod -R o-rwx "$datadir"
ln -s $datadir $final_path/upload 2> /dev/null || true
#================================================= #=================================================
# CONFIGURE # CONFIGURE

View file

@ -111,6 +111,7 @@ ynh_restore_file --origin_path="$datadir" --not_mandatory
mkdir -p "$datadir" mkdir -p "$datadir"
chown -R $app:www-data "$datadir" chown -R $app:www-data "$datadir"
chmod -R o-rwx "$datadir" chmod -R o-rwx "$datadir"
ln -s $datadir $final_path/upload 2> /dev/null || true
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION

View file

@ -73,6 +73,7 @@ if [ -z "$datadir" ]; then
rmdir $datadir && mv "$final_path/upload" $datadir || true rmdir $datadir && mv "$final_path/upload" $datadir || true
chown -R $app:www-data "$datadir" chown -R $app:www-data "$datadir"
chmod -R o-rwx "$datadir" chmod -R o-rwx "$datadir"
ln -s $datadir $final_path/upload
fi fi
# Cleaning legacy permissions # Cleaning legacy permissions
@ -121,6 +122,7 @@ chmod 750 "$final_path/tmp"
chmod 750 "$final_path/application/config/" chmod 750 "$final_path/application/config/"
chown -R $app:www-data "$datadir" chown -R $app:www-data "$datadir"
chmod 750 $datadir chmod 750 $datadir
ln -s $datadir $final_path/upload 2> /dev/null || true
#================================================= #=================================================
# NGINX CONFIGURATION # NGINX CONFIGURATION