From dedaeb1d1f387a2657a740fb39ab899c4c83cd59 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Fri, 30 Aug 2024 23:36:51 +0200 Subject: [PATCH] [autopatch] Automatic patch attempt for helpers 2.1 --- .DS_Store | Bin 6148 -> 0 bytes manifest.toml | 3 +- scripts/_common.sh | 14 +------- scripts/backup | 27 +++++--------- scripts/change_url | 32 ++++++----------- scripts/install | 64 +++++++++++++++------------------ scripts/remove | 20 ++++------- scripts/restore | 49 +++++++++++-------------- scripts/upgrade | 88 ++++++++++++++++++++++----------------------- 9 files changed, 120 insertions(+), 177 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index c1d8d8f5f0a6c5df3ca82266e55e7c1676a9c4c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHK&1%~~5Z<-jR@<1OKn@A?u+T#~ z`Pkh%R9O)uS)A*7rpD)@JloRJ&UD5@PN=oK+`}CG4Nj*xC8H|U+(|_ diff --git a/manifest.toml b/manifest.toml index d461cb9..dbcceff 100644 --- a/manifest.toml +++ b/manifest.toml @@ -17,7 +17,8 @@ admindoc = "https://docs.invidious.io/" code = "https://github.com/iv-org/invidious" [integration] -yunohost = ">= 11.2" +yunohost = ">= 11.2.18" +helpers_version = "2.1" architectures = ["amd64"] multi_instance = false diff --git a/scripts/_common.sh b/scripts/_common.sh index ec8ed90..72f18fe 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,19 +1,7 @@ #!/bin/bash #================================================= -# COMMON VARIABLES +# COMMON VARIABLES AND CUSTOM HELPERS #================================================= version_commit=e319c35f097e08590e705378c7e5b479720deabc - -#================================================= -# PERSONAL HELPERS -#================================================= - -#================================================= -# EXPERIMENTAL HELPERS -#================================================= - -#================================================= -# FUTURE OFFICIAL HELPERS -#================================================= diff --git a/scripts/backup b/scripts/backup index e4d50d3..01f6bfe 100644 --- a/scripts/backup +++ b/scripts/backup @@ -1,46 +1,37 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers -#================================================= -# DECLARE DATA AND CONF FILES TO BACKUP -#================================================= -ynh_print_info --message="Declaring files to be backed up..." +ynh_print_info "Declaring files to be backed up..." #================================================= # BACKUP THE APP MAIN DIR #================================================= -ynh_backup --src_path="$install_dir" +ynh_backup "$install_dir" #================================================= # BACKUP THE NGINX CONFIGURATION #================================================= -ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" -ynh_backup --src_path="/etc/logrotate.d/$app" +ynh_backup "/etc/logrotate.d/$app" -ynh_backup --src_path="/etc/systemd/system/$app.service" +ynh_backup "/etc/systemd/system/$app.service" -ynh_backup --src_path="/etc/cron.d/$app" +ynh_backup "/etc/cron.d/$app" #================================================= # BACKUP THE POSTGRESQL DATABASE #================================================= -ynh_print_info --message="Backing up the PostgreSQL database..." +ynh_print_info "Backing up the PostgreSQL database..." -ynh_psql_dump_db --database="$db_name" > db.sql +ynh_psql_dump_db > db.sql #================================================= # END OF SCRIPT #================================================= -ynh_print_info --message="Backup script completed for Invidious. (YunoHost will then actually copy those files to the archive)." +ynh_print_info "Backup script completed for Invidious. (YunoHost will then actually copy those files to the archive)." diff --git a/scripts/change_url b/scripts/change_url index cbd75ed..6c278f1 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -1,51 +1,41 @@ #!/bin/bash -#================================================= -# GENERIC STARTING -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers -#================================================= -# STANDARD MODIFICATIONS #================================================= # STOP SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Stopping a systemd service..." --weight=1 +ynh_script_progression "Stopping $app's systemd service..." -ynh_systemd_action --service_name="$app" --action="stop" --log_path="systemd" +ynh_systemctl --service="$app" --action="stop" --log_path="systemd" #================================================= # MODIFY URL IN NGINX CONF #================================================= -ynh_script_progression --message="Updating NGINX web server configuration..." --weight=2 +ynh_script_progression "Updating NGINX web server configuration..." -ynh_change_url_nginx_config +ynh_config_change_url_nginx #================================================= # MODIFY A CONFIG FILE #================================================= -ynh_script_progression --message="Modifying a config file..." --weight=1 +ynh_script_progression "Updating configuration..." -ynh_add_config --template="config.yml" --destination="$install_dir/config/config.yml" +ynh_config_add --template="config.yml" --destination="$install_dir/config/config.yml" -chmod 600 "$install_dir/config/config.yml" -chown "$app:$app" "$install_dir/config/config.yml" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 600 "$install_dir/config/config.yml" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown "$app:$app" "$install_dir/config/config.yml" -#================================================= -# GENERIC FINALISATION #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=3 +ynh_script_progression "Starting $app's systemd service..." -ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd" +ynh_systemctl --service="$app" --action="start" --log_path="systemd" #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Change of URL completed for $app" --last +ynh_script_progression "Change of URL completed for $app" diff --git a/scripts/install b/scripts/install index ec40918..996c4c0 100644 --- a/scripts/install +++ b/scripts/install @@ -1,11 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers @@ -23,30 +17,29 @@ banner="" #================================================= # STORE SETTINGS FROM MANIFEST #================================================= -ynh_script_progression --message="Storing installation settings..." --weight=2 +ynh_script_progression "Storing installation settings..." -ynh_app_setting_set --app="$app" --key=key --value="$key" -ynh_app_setting_set --app="$app" --key=registration_enabled --value=$registration_enabled -ynh_app_setting_set --app="$app" --key=login_enabled --value=$login_enabled -ynh_app_setting_set --app="$app" --key=captcha_enabled --value=$captcha_enabled -ynh_app_setting_set --app="$app" --key=enable_user_notifications --value=$enable_user_notifications -ynh_app_setting_set --app="$app" --key=banner --value="$banner" +ynh_app_setting_set --key=key --value="$key" +ynh_app_setting_set --key=registration_enabled --value=$registration_enabled +ynh_app_setting_set --key=login_enabled --value=$login_enabled +ynh_app_setting_set --key=captcha_enabled --value=$captcha_enabled +ynh_app_setting_set --key=enable_user_notifications --value=$enable_user_notifications +ynh_app_setting_set --key=banner --value="$banner" #================================================= # INSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Installing dependencies..." --weight=15 +ynh_script_progression "Installing dependencies..." -ynh_exec_warn_less curl -fsSL https://crystal-lang.org/install.sh | bash -s -- --channel=stable +ynh_hide_warnings curl -fsSL https://crystal-lang.org/install.sh | bash -s -- --channel=stable #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." --weight=4 +ynh_script_progression "Setting up source files..." mkdir -p "$install_dir" -chown -R "$app:www-data" "$install_dir" - +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app:www-data" "$install_dir" git config --system --add safe.directory "$install_dir" # Download, check integrity, uncompress and patch the source from GitHub @@ -60,25 +53,24 @@ pushd "$install_dir" make popd -chmod -R o-rwx "$install_dir" -chown -R "$app:www-data" "$install_dir" - +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app:www-data" "$install_dir" #================================================= # MODIFY A CONFIG FILE #================================================= -ynh_script_progression --message="Modifying a config file..." --weight=1 +ynh_script_progression "Updating configuration..." -ynh_add_config --template="config.yml" --destination="$install_dir/config/config.yml" +ynh_config_add --template="config.yml" --destination="$install_dir/config/config.yml" -chmod 600 "$install_dir/config/config.yml" -chown "$app:$app" "$install_dir/config/config.yml" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 600 "$install_dir/config/config.yml" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown "$app:$app" "$install_dir/config/config.yml" #================================================= # SPECIFIC SETUP #================================================= # INSTALL INVIDIOUS #================================================= -ynh_script_progression --message="Building Invidious.. (this will take some time and resources!)" --weight=60 +ynh_script_progression "Building Invidious.. (this will take some time and resources!)" pushd "$install_dir" ./invidious --migrate @@ -87,31 +79,31 @@ popd #================================================= # SYSTEM CONFIGURATION #================================================= -ynh_script_progression --message="Adding system configurations related to $app ..." --weight=10 +ynh_script_progression "Adding system configurations related to $app ..." # Create a dedicated NGINX config -ynh_add_nginx_config +ynh_config_add_nginx -ynh_add_config --template="cron_invidious" --destination="/etc/cron.d/$app" -chown root: "/etc/cron.d/$app" -chmod 644 "/etc/cron.d/$app" +ynh_config_add --template="cron_invidious" --destination="/etc/cron.d/$app" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown root: "/etc/cron.d/$app" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 644 "/etc/cron.d/$app" -ynh_use_logrotate +ynh_config_add_logrotate -ynh_add_systemd_config +ynh_config_add_systemd yunohost service add "$app" --description="Invidious is an alternative front-end to YouTube" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=2 +ynh_script_progression "Starting $app's systemd service..." # Start a systemd service -ynh_systemd_action --service_name="$app" --action=start --log_path=systemd +ynh_systemctl --service="$app" --action=start --log_path=systemd #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Installation of Invidious completed" --last +ynh_script_progression "Installation of Invidious completed" diff --git a/scripts/remove b/scripts/remove index 3406a71..9919b9a 100644 --- a/scripts/remove +++ b/scripts/remove @@ -1,11 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers @@ -16,28 +10,28 @@ source /usr/share/yunohost/helpers #================================================= # Remove the service from the list of services known by YunoHost (added from `yunohost service add`) -if ynh_exec_warn_less yunohost service status "$app" >/dev/null +if ynh_hide_warnings yunohost service status "$app" >/dev/null then - ynh_script_progression --message="Removing $app service..." --weight=1 + ynh_script_progression "Removing $app service..." yunohost service remove "$app" fi dpkg --remove crystal # Remove the dedicated systemd config -ynh_remove_systemd_config +ynh_config_remove_systemd # Remove the dedicated NGINX config -ynh_remove_nginx_config +ynh_config_remove_nginx # Remove the app-specific logrotate config -ynh_remove_logrotate +ynh_config_remove_logrotate # Remove a cron file -ynh_secure_remove --file="/etc/cron.d/$app" +ynh_safe_rm "/etc/cron.d/$app" #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Removal of Invidious completed" --last +ynh_script_progression "Removal of Invidious completed" diff --git a/scripts/restore b/scripts/restore index 5fbbb2a..85211b1 100644 --- a/scripts/restore +++ b/scripts/restore @@ -1,11 +1,5 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -14,65 +8,62 @@ source /usr/share/yunohost/helpers #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the NGINX configuration..." +ynh_script_progression "Restoring the NGINX configuration..." -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" +ynh_restore "/etc/nginx/conf.d/$domain.d/$app.conf" #================================================= # RESTORE THE APP MAIN DIR #================================================= -ynh_script_progression --message="Restoring the app main directory..." --weight=4 +ynh_script_progression "Restoring the app main directory..." -ynh_restore_file --origin_path="$install_dir" - -chmod -R o-rwx "$install_dir" -chown -R "$app:www-data" "$install_dir" +ynh_restore "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app:www-data" "$install_dir" #================================================= # SPECIFIC RESTORATION #================================================= # REINSTALL DEPENDENCIES #================================================= -ynh_script_progression --message="Reinstalling dependencies..." --weight=7 +ynh_script_progression "Reinstalling dependencies..." -ynh_exec_warn_less curl -fsSL https://crystal-lang.org/install.sh | bash -s -- --channel=stable +ynh_hide_warnings curl -fsSL https://crystal-lang.org/install.sh | bash -s -- --channel=stable #================================================= # RESTORE THE POSTGRESQL DATABASE #================================================= -ynh_script_progression --message="Restoring the PostgreSQL database..." --weight=6 +ynh_script_progression "Restoring the PostgreSQL database..." -ynh_psql_execute_file_as_root --file="./db.sql" --database="$db_name" +ynh_psql_db_shell " < "./db.sql"" #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1 +ynh_script_progression "Restoring system configurations related to $app..." -ynh_restore_file --origin_path="/etc/systemd/system/$app.service" +ynh_restore "/etc/systemd/system/$app.service" systemctl enable "$app.service" --quiet -ynh_restore_file --origin_path="/etc/cron.d/$app" -chown root: "/etc/cron.d/$app" -chmod 644 "/etc/cron.d/$app" +ynh_restore "/etc/cron.d/$app" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown root: "/etc/cron.d/$app" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 644 "/etc/cron.d/$app" -ynh_restore_file --origin_path="/etc/logrotate.d/$app" +ynh_restore "/etc/logrotate.d/$app" yunohost service add "$app" --description="Invidious is an alternative front-end to YouTube" --log="/var/log/$app/$app.log" -#================================================= -# GENERIC FINALIZATION #================================================= # RELOAD NGINX AND PHP-FPM OR THE APP SERVICE #================================================= -ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1 +ynh_script_progression "Reloading NGINX web server and $app's service..." -ynh_systemd_action --service_name="$app" --action=start --log_path=systemd +ynh_systemctl --service="$app" --action=start --log_path=systemd -ynh_systemd_action --service_name=nginx --action=reload +ynh_systemctl --service=nginx --action=reload #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Restoration completed for Invidious" --last +ynh_script_progression "Restoration completed for Invidious" diff --git a/scripts/upgrade b/scripts/upgrade index f4d92c0..9159ee1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -1,124 +1,120 @@ #!/bin/bash -#================================================= -# GENERIC START -#================================================= -# IMPORT GENERIC HELPERS -#================================================= - source _common.sh source /usr/share/yunohost/helpers -#================================================= -# STANDARD UPGRADE STEPS #================================================= # STOP SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Stopping a systemd service..." --weight=1 +ynh_script_progression "Stopping $app's systemd service..." -ynh_systemd_action --service_name="$app" --action=stop --log_path=systemd +ynh_systemctl --service="$app" --action=stop --log_path=systemd #================================================= # ENSURE DOWNWARD COMPATIBILITY #================================================= -ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 +ynh_script_progression "Ensuring downward compatibility..." +# FIXMEhelpers2.1: maybe replace with: ynh_app_setting_set_default --key=registration_enabled --value="true" if [ -z "${registration_enabled:-}" ]; then registration_enabled="true" - ynh_app_setting_set --app="$app" --key=registration_enabled --value=$registration_enabled + ynh_app_setting_set --key=registration_enabled --value=$registration_enabled fi +# FIXMEhelpers2.1: maybe replace with: ynh_app_setting_set_default --key=login_enabled --value="true" if [ -z "${login_enabled:-}" ]; then login_enabled="true" - ynh_app_setting_set --app="$app" --key=login_enabled --value=$login_enabled + ynh_app_setting_set --key=login_enabled --value=$login_enabled fi +# FIXMEhelpers2.1: maybe replace with: ynh_app_setting_set_default --key=captcha_enabled --value="true" if [ -z "${captcha_enabled:-}" ]; then captcha_enabled="true" - ynh_app_setting_set --app="$app" --key=captcha_enabled --value=$captcha_enabled + ynh_app_setting_set --key=captcha_enabled --value=$captcha_enabled fi +# FIXMEhelpers2.1: maybe replace with: ynh_app_setting_set_default --key=key --value=$(ynh_string_random --length=24) if [ -z "${key:-}" ]; then key=$(ynh_string_random --length=24) - ynh_app_setting_set --app="$app" --key=key --value="$key" + ynh_app_setting_set --key=key --value="$key" fi +# FIXMEhelpers2.1: maybe replace with: ynh_app_setting_set_default --key=enable_user_notifications --value="true" if [ -z "${enable_user_notifications:-}" ]; then enable_user_notifications="true" - ynh_app_setting_set --app="$app" --key=enable_user_notifications --value="$enable_user_notifications" + ynh_app_setting_set --key=enable_user_notifications --value="$enable_user_notifications" fi +# FIXMEhelpers2.1: maybe replace with: ynh_app_setting_set_default --key=banner --value="" if [ -z "${banner:-}" ]; then banner="" - ynh_app_setting_set --app="$app" --key=banner --value="$banner" + ynh_app_setting_set --key=banner --value="$banner" fi #================================================= # UPGRADE DEPENDENCIES #================================================= -ynh_script_progression --message="Upgrading dependencies..." --weight=8 +ynh_script_progression "Upgrading dependencies..." -ynh_exec_warn_less curl -fsSL https://crystal-lang.org/install.sh | bash -s -- --channel=stable +ynh_hide_warnings curl -fsSL https://crystal-lang.org/install.sh | bash -s -- --channel=stable #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Upgrading source files..." --weight=5 +ynh_script_progression "Upgrading source files..." pushd "$install_dir" - chown -R "$app:www-data" "$install_dir" + #REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app:www-data" "$install_dir" git config --system --add safe.directory "$install_dir" - ynh_exec_as "$app" git config pull.rebase false - - ynh_exec_as "$app" git fetch + ynh_exec_as_app git config pull.rebase false + + ynh_exec_as_app git fetch #git checkout master - ynh_exec_as "$app" git reset --hard --quiet "$version_commit" - ynh_exec_as "$app" git pull - ynh_exec_warn_less shards install --production - ynh_exec_warn_less crystal build "$install_dir/src/invidious.cr" --release + ynh_exec_as_app git reset --hard --quiet "$version_commit" + ynh_exec_as_app git pull + ynh_hide_warnings shards install --production + ynh_hide_warnings crystal build "$install_dir/src/invidious.cr" --release popd - -chmod -R o-rwx "$install_dir" -chown -R "$app:www-data" "$install_dir" - +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" +#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R "$app:www-data" "$install_dir" #================================================= # REAPPLY SYSTEM CONFIGURATIONS #================================================= -ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1 +ynh_script_progression "Upgrading system configurations related to $app..." # Create a dedicated NGINX config -ynh_add_nginx_config +ynh_config_add_nginx -ynh_add_systemd_config +ynh_config_add_systemd -ynh_add_config --template="cron_invidious" --destination="/etc/cron.d/$app" -chown root: "/etc/cron.d/$app" -chmod 644 "/etc/cron.d/$app" +ynh_config_add --template="cron_invidious" --destination="/etc/cron.d/$app" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown root: "/etc/cron.d/$app" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 644 "/etc/cron.d/$app" -ynh_use_logrotate --non-append +ynh_config_add_logrotate yunohost service add "$app" --description="Invidious is an alternative front-end to YouTube" --log="/var/log/$app/$app.log" #================================================= # MODIFY A CONFIG FILE #================================================= -ynh_script_progression --message="Modifying a config file..." --weight=1 +ynh_script_progression "Updating configuration..." -ynh_add_config --template="config.yml" --destination="$install_dir/config/config.yml" +ynh_config_add --template="config.yml" --destination="$install_dir/config/config.yml" -chmod 600 "$install_dir/config/config.yml" -chown "$app:$app" "$install_dir/config/config.yml" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 600 "$install_dir/config/config.yml" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown "$app:$app" "$install_dir/config/config.yml" #================================================= # START SYSTEMD SERVICE #================================================= -ynh_script_progression --message="Starting a systemd service..." --weight=1 +ynh_script_progression "Starting $app's systemd service..." -ynh_systemd_action --service_name="$app" --action=restart --log_path=systemd +ynh_systemctl --service="$app" --action=restart --log_path=systemd #================================================= # END OF SCRIPT #================================================= -ynh_script_progression --message="Upgrade of Invidious completed" --last +ynh_script_progression "Upgrade of Invidious completed"