From 5c7ee221cb927c3d73abd5f9ec3e7c535c463a24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Tue, 12 Apr 2022 18:30:40 +0200 Subject: [PATCH] Fixes --- conf/uwsgi.yaml | 2 +- scripts/install | 4 ++-- scripts/restore | 6 ++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/conf/uwsgi.yaml b/conf/uwsgi.yaml index ffe129f..5ccc15b 100644 --- a/conf/uwsgi.yaml +++ b/conf/uwsgi.yaml @@ -21,7 +21,7 @@ uwsgi: env: DJANGO_SETTINGS_MODULE=pytition.settings.config socket: /run/__APP__/app.socket - mount: /__PATH__=pytition/wsgi.py + mount: __PATH__=pytition/wsgi.py manage-script-name: true logto: /var/log/__APP__/__APP__-uwsgi.log diff --git a/scripts/install b/scripts/install index 3e10299..ad67b1f 100755 --- a/scripts/install +++ b/scripts/install @@ -120,7 +120,7 @@ virtualenv --python=python3 --system-site-packages "${final_path}/venv" #================================================= # CREATE DATA DIRECTORY #================================================= -ynh_script_progression --message="Creating a data directory..." --time --weight=1 +ynh_script_progression --message="Creating the log directory..." --time --weight=1 mkdir -p "/var/log/$app" chmod 750 "/var/log/$app" @@ -186,7 +186,7 @@ ynh_exec_as $app bash -c " python3 manage.py createsuperuser --noinput --username admin --email 'admin@$domain' " -chmod 400 "$final_path/static" +chmod 750 "$final_path/static" chown -R $app:www-data "$final_path/static" #================================================= diff --git a/scripts/restore b/scripts/restore index 6b1c0cc..28482cc 100755 --- a/scripts/restore +++ b/scripts/restore @@ -112,6 +112,12 @@ systemctl enable $app.service --quiet # ynh_restore_file --origin_path="/etc/logrotate.d/$app" +ynh_script_progression --message="Creating the log directory..." --time --weight=1 + +mkdir -p "/var/log/$app" +chmod 750 "/var/log/$app" +chown -R $app:www-data "/var/log/$app" + #================================================= # INTEGRATE SERVICE IN YUNOHOST #=================================================