diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 783a4ae..0000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*~ -*.sw[op] diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 91e90e1..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "markdownlint.config": { - "MD028": false, - "MD025": { - "front_matter_title": "" - } - } -} \ No newline at end of file diff --git a/check_process b/check_process index 5a331db..512c5da 100644 --- a/check_process +++ b/check_process @@ -1,13 +1,8 @@ -# See here for more information -# https://github.com/YunoHost/package_check#syntax-check_process-file - -# Move this file from check_process.default to check_process when you have filled it. - ;; Test complet ; Manifest - domain="domain.tld" (DOMAIN) - admin="john" (USER) - is_public=1 (PUBLIC|public=1|private=0) + domain="domain.tld" + admin="john" + is_public=1 ; Checks pkg_linter=1 setup_sub_dir=0 @@ -16,7 +11,10 @@ setup_private=1 setup_public=1 upgrade=1 + # 2.11.1~ynh3 upgrade=1 from_commit=a50d46ae3a01d8a5b08ca9f9e62bfc9269fdedfa + # 2.11.20210519~ynh1 + upgrade=1 from_commit=59b41b65dc33c3da471175002f37576ff460dc46 backup_restore=1 multi_instance=0 port_already_use=0 @@ -26,6 +24,5 @@ Email= Notification=none ;;; Upgrade options ; commit=CommitHash - name= Tweak starting of systemd services (April 1) + name=Tweak starting of systemd services (April 1) manifest_arg=domain=DOMAIN&admin=USER&is_public=1& - diff --git a/conf/systemd.service b/conf/systemd.service index c3dfa7a..e193b5d 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -8,7 +8,7 @@ Requires=__APP__.socket Type=notify User=__APP__ Group=__APP__ -WorkingDirectory=__FINALPATH__ +WorkingDirectory=__FINALPATH__/ ExecStart=__FINALPATH__/venv/bin/envdir __FINALPATH__/envs/prod __FINALPATH__/venv/bin/gunicorn -c __FINALPATH__/conf/gunicorn.conf.py mygpo.wsgi:application --bind unix:/run/__APP__.sock ExecReload=/bin/kill -s HUP $MAINPID @@ -18,4 +18,4 @@ TimeoutStopSec=5 PrivateTmp=true [Install] -WantedBy=multi-user.target \ No newline at end of file +WantedBy=multi-user.target diff --git a/doc/.gitkeep b/doc/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/DESCRIPTION.md b/doc/DESCRIPTION.md new file mode 100644 index 0000000..ea1b39a --- /dev/null +++ b/doc/DESCRIPTION.md @@ -0,0 +1,5 @@ +This is the webservice powering the https://gpodder.net website. It can be used to sync podcast subscriptions with [supported clients](https://gpoddernet.readthedocs.io/en/latest/user/clients.html). + +## Configuration + +Edit files under `/opt/yunohost/APPDIR/envs/prod` to set environment variables. There is an admin interface at `yourdomain.tld/admin` that the admin user can log in to. diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md new file mode 100644 index 0000000..8face07 --- /dev/null +++ b/doc/DISCLAIMER.md @@ -0,0 +1,3 @@ +## Limitations + +* The feed-parsing service is not included, https://feeds.gpodder.net is used diff --git a/doc/screenshots/.gitkeep b/doc/screenshots/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/doc/screenshots/screenshot1.png b/doc/screenshots/screenshot1.png new file mode 100644 index 0000000..d2ef720 Binary files /dev/null and b/doc/screenshots/screenshot1.png differ diff --git a/hooks/post_user_delete b/hooks/post_user_delete index f0d5dfa..3965586 100644 --- a/hooks/post_user_delete +++ b/hooks/post_user_delete @@ -10,7 +10,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) env_path=$final_path/envs/prod pushd $final_path || ynh_die - sudo -u $app $final_path/venv/bin/envdir $env_path $final_path/venv/bin/python $final_path/manage.py shell <<< " + ynh_exec_as $app $final_path/venv/bin/envdir $env_path $final_path/venv/bin/python $final_path/manage.py shell <<< " from django.contrib.auth import get_user_model User = get_user_model() try: diff --git a/manifest.json b/manifest.json index efb2f06..971088f 100644 --- a/manifest.json +++ b/manifest.json @@ -8,13 +8,20 @@ }, "version": "2.11.20211020~ynh1", "url": "https://github.com/gpodder/mygpo", + "upstream": { + "license": "AGPL-3.0-only", + "website": "https://gpodder.net", + "demo": "https://gpodder.net", + "admindoc": "https://gpoddernet.readthedocs.io/", + "code": "https://github.com/gpodder/mygpo" + }, "license": "AGPL-3.0-only", "maintainer": { "name": "Jules Bertholet", "email": "jules.bertholet@gmail.com" }, "requirements": { - "yunohost": ">= 4.1.3" + "yunohost": ">= 4.3.0" }, "multi_instance": false, "services": [ @@ -23,16 +30,14 @@ "redis-server" ], "arguments": { - "install" : [ + "install": [ { "name": "domain", - "type": "domain", - "example": "example.com" + "type": "domain" }, { "name": "admin", - "type": "user", - "example": "johndoe" + "type": "user" }, { "name": "is_public", diff --git a/scripts/_common.sh b/scripts/_common.sh index 1e7e702..3072e83 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -11,14 +11,14 @@ pkg_dependencies="acl python3 python3-dev python3-pip python3-venv postgresql po #================================================= function set_permissions { - mkdir -p $data_path + mkdir -p $datadir env_path=$final_path/envs/prod mkdir -p $env_path - chown -R $app:$app $data_path - chmod o-rwx $data_path - setfacl -n -R -m u:www-data:rx -m d:u:www-data:rx $data_path + chown -R $app:$app $datadir + chmod o-rwx $datadir + setfacl -n -R -m u:www-data:rx -m d:u:www-data:rx $datadir chown -R root:$app $final_path chmod -R g=u,g-w,o-rwx $final_path @@ -32,11 +32,11 @@ function set_up_virtualenv { pushd $final_path || ynh_die chown -R $app:$app $final_path - sudo -u $app python3 -m venv $final_path/venv - sudo -u $app $final_path/venv/bin/pip --cache-dir $final_path/.cache/pip install -U wheel pip --cache-dir $final_path/.cache/pip setuptools - sudo -u $app $final_path/venv/bin/pip --cache-dir $final_path/.cache/pip install -U --requirement $final_path/requirements.txt - sudo -u $app $final_path/venv/bin/pip --cache-dir $final_path/.cache/pip install -U --requirement $final_path/requirements-setup.txt - sudo -u $app $final_path/venv/bin/pip --cache-dir $final_path/.cache/pip install -U --requirement $final_path/requirements-ynh.txt + ynh_exec_warn_less ynh_exec_as $app python3 -m venv $final_path/venv + ynh_exec_warn_less ynh_exec_as $app $final_path/venv/bin/pip --cache-dir $final_path/.cache/pip install -U wheel pip --cache-dir $final_path/.cache/pip setuptools + ynh_exec_warn_less ynh_exec_as $app $final_path/venv/bin/pip --cache-dir $final_path/.cache/pip install -U --requirement $final_path/requirements.txt + ynh_exec_warn_less ynh_exec_as $app $final_path/venv/bin/pip --cache-dir $final_path/.cache/pip install -U --requirement $final_path/requirements-setup.txt + ynh_exec_warn_less ynh_exec_as $app $final_path/venv/bin/pip --cache-dir $final_path/.cache/pip install -U --requirement $final_path/requirements-ynh.txt set_permissions popd || ynh_dies } @@ -45,7 +45,7 @@ function initialize_db { pushd $final_path || ynh_die chown -R $app:$app $final_path perform_db_migrations - sudo -u $app $final_path/venv/bin/envdir $env_path $final_path/venv/bin/python $final_path/manage.py createsuperuser --username "$admin" --email "$admin_email" --noinput -v 0 + ynh_exec_warn_less ynh_exec_as $app $final_path/venv/bin/envdir $env_path $final_path/venv/bin/python $final_path/manage.py createsuperuser --username "$admin" --email "$admin_email" --noinput -v 0 set_permissions popd || ynh_die } @@ -59,15 +59,15 @@ function upgrade_db { } function perform_db_migrations { - sudo -u $app $final_path/venv/bin/envdir $env_path $final_path/venv/bin/python $final_path/manage.py makemigrations --merge - sudo -u $app $final_path/venv/bin/envdir $env_path $final_path/venv/bin/python $final_path/manage.py migrate + ynh_exec_warn_less ynh_exec_as $app $final_path/venv/bin/envdir $env_path $final_path/venv/bin/python $final_path/manage.py makemigrations --merge + ynh_exec_warn_less ynh_exec_as $app $final_path/venv/bin/envdir $env_path $final_path/venv/bin/python $final_path/manage.py migrate } function get_app_settings { domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) - data_path=$(ynh_app_setting_get --app=$app --key=data_path) + datadir=$(ynh_app_setting_get --app=$app --key=datadir) admin=$(ynh_app_setting_get --app=$app --key=admin) secret_key=$(ynh_app_setting_get --app=$app --key=secret_key) admin_email=$(ynh_user_get_info --username=$admin --key="mail") diff --git a/scripts/backup b/scripts/backup index a01aa8b..bfc4d1b 100755 --- a/scripts/backup +++ b/scripts/backup @@ -5,6 +5,7 @@ #================================================= # IMPORT GENERIC HELPERS #================================================= + # Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -12,6 +13,7 @@ source /usr/share/yunohost/helpers #================================================= # MANAGE SCRIPT FAILURE #================================================= + ynh_clean_setup () { true } @@ -35,11 +37,19 @@ ynh_print_info --message="Declaring files to be backed up..." #================================================= # BACKUP THE APP MAIN DIR #================================================= + ynh_backup --src_path="$final_path" +#================================================= +# BACKUP THE DATA DIR +#================================================= + +ynh_backup --src_path="$datadir" --is_big + #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= + ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= @@ -47,15 +57,12 @@ ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # BACKUP SYSTEMD #================================================= + ynh_backup --src_path="/etc/systemd/system/$app.service" ynh_backup --src_path="/etc/systemd/system/$app-celery.service" ynh_backup --src_path="/etc/systemd/system/$app-beat.service" ynh_backup --src_path="/etc/systemd/system/$app.socket" -#================================================= -# BACKUP VARIOUS FILES -#================================================= -ynh_backup --is_big --src_path="/home/yunohost.app/$app" #================================================= # BACKUP THE POSTGRESQL DATABASE @@ -67,4 +74,5 @@ ynh_psql_dump_db --database="$db_name" > db.sql #================================================= # END OF SCRIPT #================================================= + ynh_print_info --message="Backup script completed for $app. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index 4e84165..6e78f4b 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -5,15 +5,19 @@ #================================================= # IMPORT GENERIC HELPERS #================================================= + source _common.sh source /usr/share/yunohost/helpers #================================================= # RETRIEVE ARGUMENTS #================================================= + old_domain=$YNH_APP_OLD_DOMAIN +old_path=$YNH_APP_OLD_PATH new_domain=$YNH_APP_NEW_DOMAIN +new_path="/" app=$YNH_APP_INSTANCE_NAME @@ -25,9 +29,9 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 get_app_settings #================================================= -# BACKUP BEFORE UPGRADE THEN ACTIVE TRAP +# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP #================================================= -ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." --weight=1 +ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..." # Backup the current version of the app ynh_backup_before_upgrade @@ -44,12 +48,19 @@ ynh_abort_if_errors #================================================= # CHECK WHICH PARTS SHOULD BE CHANGED #================================================= + change_domain=0 if [ "$old_domain" != "$new_domain" ] then change_domain=1 fi +change_path=0 +if [ "$old_path" != "$new_path" ] +then + change_path=1 +fi + #================================================= # STANDARD MODIFICATIONS #================================================= @@ -110,4 +121,5 @@ ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT #================================================= + ynh_script_progression --message="Change of URL completed for $app" --last diff --git a/scripts/install b/scripts/install index fef2b4d..4b548ad 100755 --- a/scripts/install +++ b/scripts/install @@ -5,12 +5,14 @@ #================================================= # IMPORT GENERIC HELPERS #================================================= + source _common.sh source /usr/share/yunohost/helpers #================================================= # MANAGE SCRIPT FAILURE #================================================= + ynh_clean_setup () { true } @@ -39,9 +41,6 @@ ynh_script_progression --message="Validating installation parameters..." --weigh final_path=/opt/yunohost/$app test ! -e "$final_path" || ynh_die --message="This path already contains a folder" -data_path=/home/yunohost.app/$app -test ! -e "$data_path" || ynh_die --message="This path already contains a folder" - # Register (book) web path ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url @@ -69,8 +68,8 @@ ynh_install_app_dependencies $pkg_dependencies #================================================= ynh_script_progression --message="Configuring system user..." --weight=1 -# Create a q user -ynh_system_user_create --username=$app +# Create a system user +ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # CREATE A POSTGRESQL DATABASE @@ -90,12 +89,9 @@ ynh_psql_execute_as_root --sql="ALTER ROLE $db_user SET statement_timeout = 5000 ynh_script_progression --message="Setting up source files..." --weight=1 ynh_app_setting_set --app=$app --key=final_path --value=$final_path -ynh_app_setting_set --app=$app --key=data_path --value=$data_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" -set_permissions - #================================================= # NGINX CONFIGURATION #================================================= @@ -106,6 +102,16 @@ ynh_add_nginx_config #================================================= # SPECIFIC SETUP +#================================================= +# CREATE DATA DIRECTORY +#================================================= +ynh_script_progression --message="Creating a data directory..." + +datadir=/home/yunohost.app/$app +ynh_app_setting_set --app=$app --key=datadir --value=$datadir + +set_permissions + #================================================= # ENVDIR CONFIGURATION #================================================= @@ -119,7 +125,7 @@ echo False > $env_path/DEBUG echo $domain > $env_path/DEFAULT_BASE_URL echo "$app@$domain" > $env_path/DEFAULT_FROM_EMAIL echo "django.core.mail.backends.console.EmailBackend" > $env_path/EMAIL_BACKEND -echo "$data_path" > $env_path/MEDIA_ROOT +echo "$datadir" > $env_path/MEDIA_ROOT echo $secret_key > $env_path/SECRET_KEY echo "$app@$domain" > $env_path/SERVER_EMAIL echo $staff_token > $env_path/STAFF_TOKEN @@ -134,6 +140,8 @@ set_up_virtualenv #================================================= # INITIALIZE DATABASE #================================================= +ynh_script_progression --message="Initializing database..." + initialize_db #================================================= @@ -202,4 +210,5 @@ ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT #================================================= + ynh_script_progression --message="Installation of $app completed" --last diff --git a/scripts/remove b/scripts/remove index 49d1143..fe4f4f6 100755 --- a/scripts/remove +++ b/scripts/remove @@ -5,6 +5,7 @@ #================================================= # IMPORT GENERIC HELPERS #================================================= + source _common.sh source /usr/share/yunohost/helpers @@ -53,14 +54,6 @@ ynh_script_progression --message="Removing the PostgreSQL database..." --weight= # Remove a database if it exists, along with the associated user ynh_psql_remove_db --db_user=$db_user --db_name=$db_name -#================================================= -# REMOVE DEPENDENCIES -#================================================= -ynh_script_progression --message="Removing dependencies..." --weight=1 - -# Remove metapackage and its dependencies -ynh_remove_app_dependencies - #================================================= # REMOVE APP MAIN DIR #================================================= @@ -69,6 +62,17 @@ ynh_script_progression --message="Removing app main directory..." --weight=1 # Remove the app directory securely ynh_secure_remove --file="$final_path" +#================================================= +# REMOVE DATA DIR +#================================================= + +# Remove the data directory if --purge option is used +if [ "${YNH_APP_PURGE:-0}" -eq 1 ] +then + ynh_script_progression --message="Removing app data directory..." + ynh_secure_remove --file="$datadir" +fi + #================================================= # REMOVE NGINX CONFIGURATION #================================================= @@ -77,18 +81,24 @@ ynh_script_progression --message="Removing NGINX web server configuration..." -- # Remove the dedicated NGINX config ynh_remove_nginx_config +#================================================= +# REMOVE DEPENDENCIES +#================================================= +ynh_script_progression --message="Removing dependencies..." --weight=1 + +# Remove metapackage and its dependencies +ynh_remove_app_dependencies + #================================================= # SPECIFIC REMOVE #================================================= # REMOVE VARIOUS FILES #================================================= +ynh_script_progression --message="Removing various files..." # Remove the log files ynh_secure_remove --file="/var/log/$app" -# Remove data dir -ynh_secure_remove --file="$data_path" - #================================================= # GENERIC FINALIZATION #================================================= diff --git a/scripts/restore b/scripts/restore index 617b42a..0e9c98b 100755 --- a/scripts/restore +++ b/scripts/restore @@ -5,6 +5,7 @@ #================================================= # IMPORT GENERIC HELPERS #================================================= + # Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -12,6 +13,7 @@ source /usr/share/yunohost/helpers #================================================= # MANAGE SCRIPT FAILURE #================================================= + ynh_clean_setup () { true } @@ -32,19 +34,16 @@ get_app_settings #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=1 -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" test ! -d $final_path \ || ynh_die --message="There is already a directory: $final_path " -test ! -d $data_path \ - || ynh_die --message="There is already a directory: $data_path " - #================================================= # STANDARD RESTORATION STEPS #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= +ynh_script_progression --message="Restoring the NGINX web server configuration..." + ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= @@ -53,7 +52,7 @@ ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_script_progression --message="Recreating the dedicated system user..." --weight=1 # Create the dedicated user (if not existing) -ynh_system_user_create --username=$app +ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # RESTORE THE APP MAIN DIR @@ -63,12 +62,20 @@ ynh_script_progression --message="Restoring the app main directory..." --weight= ynh_restore_file --origin_path="$final_path" #================================================= -# RESTORE DATA DIR +# RESTORE THE DATA DIRECTORY #================================================= -ynh_script_progression --message="Restoring the app data directory..." +ynh_script_progression --message="Restoring the data directory..." -ynh_restore_file --origin_path="$data_path" --not_mandatory +ynh_restore_file --origin_path="$datadir" --not_mandatory +mkdir -p $datadir + +chmod 750 "$datadir" +chmod -R o-rwx "$datadir" +chown -R $app:www-data "$datadir" + +#================================================= +# SPECIFIC RESTORATION #================================================= # REINSTALL DEPENDENCIES #================================================= @@ -77,14 +84,6 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=1 # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies -#================================================= -# RESTORE USER RIGHTS -#================================================= -# Restore permissions on app files -set_permissions - -#================================================= -# SPECIFIC RESTORATION #================================================= # RESTORE THE POSTGRESQL DATABASE #================================================= @@ -95,6 +94,12 @@ db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) ynh_psql_setup_db --db_user=$db_user --db_name=$db_name --db_pwd=$db_pwd ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql +#================================================= +# RESTORE USER RIGHTS +#================================================= +# Restore permissions on app files +set_permissions + #================================================= # RESTORE SYSTEMD #================================================= @@ -139,4 +144,5 @@ ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT #================================================= + ynh_script_progression --message="Restoration completed for $app" --last diff --git a/scripts/upgrade b/scripts/upgrade index 11d1838..d039df0 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -5,6 +5,7 @@ #================================================= # IMPORT GENERIC HELPERS #================================================= + source _common.sh source /usr/share/yunohost/helpers @@ -20,21 +21,10 @@ get_app_settings #================================================= # CHECK VERSION #================================================= +ynh_script_progression --message="Checking version..." + upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." --time --weight=1 - -if [ -z "$data_path" ]; then - data_path=$(ynh_app_setting_get --app=$app --key=datadir) - ynh_app_setting_set --app=$app --key=data_path --value=$data_path - ynh_app_setting_delete --app=$app --key=datadir - ynh_app_setting_delete --app=$app --key=db_pwd - ynh_app_setting_delete --app=$app --key=admin_email -fi - #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -67,15 +57,30 @@ systemctl disable $app-beat --quiet systemctl disable $app-celery --quiet #================================================= -# UPGRADE DEPENDENCIES +# ENSURE DOWNWARD COMPATIBILITY #================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=1 +ynh_script_progression --message="Ensuring downward compatibility..." --time --weight=1 -ynh_install_app_dependencies $pkg_dependencies +if [ -z "$datadir" ]; then + datadir=$(ynh_app_setting_get --app=$app --key=datadir) + ynh_app_setting_set --app=$app --key=datadir --value=$datadir + ynh_app_setting_delete --app=$app --key=datadir + ynh_app_setting_delete --app=$app --key=db_pwd + ynh_app_setting_delete --app=$app --key=admin_email +fi + +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 + +# Create a dedicated user (if not existing) +ynh_system_user_create --username=$app --home_dir=$final_path #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= + if [ "$upgrade_type" == "UPGRADE_APP" ] then ynh_script_progression --message="Upgrading source files..." --weight=1 @@ -95,12 +100,11 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." - ynh_add_nginx_config #================================================= -# CREATE DEDICATED USER +# UPGRADE DEPENDENCIES #================================================= -ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 +ynh_script_progression --message="Upgrading dependencies..." --weight=1 -# Create a dedicated user (if not existing) -ynh_system_user_create --username=$app +ynh_install_app_dependencies $pkg_dependencies #================================================= # SPECIFIC UPGRADE @@ -161,4 +165,5 @@ ynh_systemd_action --service_name=nginx --action=reload #================================================= # END OF SCRIPT #================================================= + ynh_script_progression --message="Upgrade of $app completed" --last