From 91c665e26c0048fc19221b2b4ea1ce9f21468aff Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 9 Jan 2023 09:20:02 +0100 Subject: [PATCH] add ffmpeg --- scripts/_common.sh | 2 ++ scripts/install | 7 +++++++ scripts/restore | 10 +++++++++- scripts/upgrade | 7 +++++++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index 1e47ce7..dbaa33f 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,6 +6,8 @@ # PHP APP SPECIFIC #================================================= +pkg_dependencies="ffmpeg" + #================================================= # PERSONAL HELPERS #================================================= diff --git a/scripts/install b/scripts/install index 0c89db7..5d2eef6 100755 --- a/scripts/install +++ b/scripts/install @@ -79,6 +79,13 @@ ynh_script_progression --message="Finding an available port..." --weight=1 port=$(ynh_find_port --port=8000) ynh_app_setting_set --app=$app --key=port --value=$port +#================================================= +# INSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Installing dependencies..." --weight=4 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # CREATE DEDICATED USER #================================================= diff --git a/scripts/restore b/scripts/restore index aa301a3..e75e561 100755 --- a/scripts/restore +++ b/scripts/restore @@ -75,10 +75,18 @@ chmod 750 "$datadir" chmod -R o-rwx "$datadir" chown -R $app:www-data "$datadir" +#================================================= +# REINSTALL DEPENDENCIES +#================================================= +ynh_script_progression --message="Reinstalling dependencies..." --weight=1 + +# Define and install dependencies +ynh_install_app_dependencies $pkg_dependencies + #================================================= # RESTORE THE NGINX CONFIGURATION #================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." --time --weight=1 +ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=1 ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" diff --git a/scripts/upgrade b/scripts/upgrade index 190286b..8d13a28 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -131,6 +131,13 @@ chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" chmod +x "$final_path/tube" +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." --weight=1 + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # NGINX CONFIGURATION #=================================================