1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/pytition_ynh.git synced 2024-09-03 20:16:08 +02:00

Move the uwsgi config file to the final_path instead of /etc

This commit is contained in:
Salamandar 2022-04-11 17:43:28 +02:00 committed by Félix Piédallu
parent 8b458e9102
commit 6cc0d6361f
5 changed files with 5 additions and 18 deletions

View file

@ -9,7 +9,7 @@ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__FINALPATH__ WorkingDirectory=__FINALPATH__
RuntimeDirectory=__APP__ RuntimeDirectory=__APP__
ExecStart=uwsgi --yaml /etc/uwsgi/apps-available/__APP__.yaml --die-on-term ExecStart=uwsgi --yaml __FINALPATH__/uwsgi.yaml --die-on-term
StandardOutput=append:/var/log/__APP__/__APP__.log StandardOutput=append:/var/log/__APP__/__APP__.log
StandardError=inherit StandardError=inherit

View file

@ -72,12 +72,6 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_backup --src_path="/etc/systemd/system/$app.service" ynh_backup --src_path="/etc/systemd/system/$app.service"
#=================================================
# BACKUP VARIOUS FILES
#=================================================
ynh_backup --src_path="/etc/uwsgi/apps-available/$app.yaml"
#================================================= #=================================================
# BACKUP THE MYSQL DATABASE # BACKUP THE MYSQL DATABASE
#================================================= #=================================================

View file

@ -113,7 +113,7 @@ fi
ynh_script_progression --message="Updating app's configuration..." --time --weight=1 ynh_script_progression --message="Updating app's configuration..." --time --weight=1
ynh_add_config --template="../conf/config.py" --destination="$final_path/pytition/pytition/pytition/settings/config.py" ynh_add_config --template="../conf/config.py" --destination="$final_path/pytition/pytition/pytition/settings/config.py"
ynh_add_config --template="../conf/uwsgi.yaml" --destination="/etc/uwsgi/apps-available/$app.yaml" ynh_add_config --template="../conf/uwsgi.yaml" --destination="$final_path/uwsgi.yaml"
#================================================= #=================================================
# GENERIC FINALISATION # GENERIC FINALISATION

View file

@ -164,9 +164,9 @@ ynh_add_config --template="../conf/config.py" --destination="$config_path"
chmod 400 "$config_path" chmod 400 "$config_path"
chown $app:$app "$config_path" chown $app:$app "$config_path"
ynh_add_config --template="../conf/uwsgi.yaml" --destination="/etc/uwsgi/apps-available/$app.yaml" ynh_add_config --template="../conf/uwsgi.yaml" --destination="$final_path/uwsgi.yaml"
chmod 400 "/etc/uwsgi/apps-available/$app.yaml" chmod 400 "$final_path/uwsgi.yaml"
chown $app:$app "/etc/uwsgi/apps-available/$app.yaml" chown $app:$app "$final_path/uwsgi.yaml"
#================================================= #=================================================
# Run app configuration # Run app configuration

View file

@ -97,13 +97,6 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd)
ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_mysql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
#=================================================
# RESTORE VARIOUS FILES
#=================================================
ynh_script_progression --message="Restoring various files..." --time --weight=1
ynh_restore_file --origin_path="/etc/uwsgi/apps-available/$app.yaml"
#================================================= #=================================================
# RESTORE SYSTEMD # RESTORE SYSTEMD
#================================================= #=================================================