diff --git a/scripts/restore b/scripts/restore index 31bc7f9..770aad3 100644 --- a/scripts/restore +++ b/scripts/restore @@ -46,7 +46,11 @@ test -f $gunicorn_conf_path && ynh_die \ "The Gunicorn configuration already exists at '${gunicorn_conf_path}'. You should safely delete it before restoring this app." +# Install debian packages dependencies +sudo apt-get install -y -qq python-dev python-virtualenv supervisor libmysqlclient-dev + # Create the dedicated user +sudo mkdir -p /opt/yunohost/ sudo useradd ihatemoney -d /opt/yunohost/ihatemoney/ --create-home # Restore the app files @@ -67,9 +71,6 @@ sudo cp -a "conf/gunicorn.conf.py" "$gunicorn_conf_path" sudo cp -a "conf/supervisor.conf" "$supervisor_conf_path" sudo cp -a "conf/settings.py" "$ihatemoney_conf_path" -# Install debian packages dependencies -sudo apt-get install -y -qq python-dev python-virtualenv supervisor libmysqlclient-dev - # Reload sudo systemctl reload nginx sudo systemctl restart supervisor diff --git a/scripts/upgrade b/scripts/upgrade index 354b479..205cd23 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -13,11 +13,11 @@ INSTALL_DIR=/opt/yunohost/ihatemoney PIP=${INSTALL_DIR}/venv/bin/pip NEW_REQUIREMENTS=${INSTALL_DIR}/src-new/requirements.txt -domain=$(ynh_app_setting_get "$app" domain) - # Source YunoHost helpers . /usr/share/yunohost/helpers +domain=$(ynh_app_setting_get "$app" domain) + # Source local utils source _common.sh