1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pytition_ynh.git synced 2024-09-03 20:16:08 +02:00
This commit is contained in:
Félix Piédallu 2022-04-12 18:30:40 +02:00
parent 5414b5d24b
commit 5c7ee221cb
3 changed files with 9 additions and 3 deletions

View file

@ -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

View file

@ -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"
#=================================================

View file

@ -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
#=================================================