From 434e4ba2866bb33f83aed89ecf486d7fc26a9fc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Tue, 17 Jan 2023 22:00:17 +0100 Subject: [PATCH] Update install --- scripts/install | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/scripts/install b/scripts/install index 27982e7..745c2ff 100755 --- a/scripts/install +++ b/scripts/install @@ -106,6 +106,21 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# CREATE DATA DIRECTORY +#================================================= +ynh_script_progression --message="Creating a data directory..." --weight=1 + +datadir=/home/yunohost.app/$app +ynh_app_setting_set --app=$app --key=datadir --value=$datadir + +mkdir -p $datadir +mkdir -p $datadir/images + +chmod 750 "$datadir" +chmod -R o-rwx "$datadir" +chown -R $app:www-data "$datadir" + #================================================= # CONFIGURE THEN INSTALL SCRIPT AND DEPENDENCIES #================================================= @@ -136,21 +151,6 @@ $final_path/venv/bin/python3 "$final_path/manage.py" collectstatic --no-input chown -R $app:www-data $final_path -#================================================= -# CREATE DATA DIRECTORY -#================================================= -ynh_script_progression --message="Creating a data directory..." --weight=1 - -datadir=/home/yunohost.app/$app -ynh_app_setting_set --app=$app --key=datadir --value=$datadir - -mkdir -p $datadir -mkdir -p $datadir/images - -chmod 750 "$datadir" -chmod -R o-rwx "$datadir" -chown -R $app:www-data "$datadir" - #================================================= # NGINX CONFIGURATION #=================================================