From 82b796fecbc9243466c8a9bad0aec718a89ea760 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Sun, 6 Mar 2022 10:22:13 +0100 Subject: [PATCH] Update install --- scripts/install | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/install b/scripts/install index 7735ec0..1efd7d4 100644 --- a/scripts/install +++ b/scripts/install @@ -145,14 +145,25 @@ ynh_script_progression --message="Configuring a systemd service..." # Create a dedicated systemd config ynh_add_systemd_config +#================================================= +# INSTALL MOVIM WITH COMPOSER +#================================================= +ynh_script_progression --message="Installing $app with Composer..." + +ynh_install_composer --phpversion="$phpversion" --workdir="$final_path" + #================================================= # BUILD MOVIM #================================================= ynh_script_progression --message="Building Movim..." -ynh_exec_warn_less ynh_install_composer --phpversion="$phpversion" --workdir="$final_path" ynh_exec_warn_less ynh_composer_exec --phpversion="$phpversion" --workdir="$final_path" --commands="movim:migrate" -#ynh_exec_as $app php$phpversion $final_path/daemon.php setAdmin $email + +date=(date "+%F %T") +# We need to register the admin in the database first before setting the admin JID +ynh_psql_connect_as --user=$db_user --password=$db_pwd --database=$db_name <<< "INSERT INTO users (id, configuration, language, nightmode, nsfw, public, created_at, updated_at, nickname, chatmain, notificationchat, notificationcall, admin) VALUES ($email, NULL, fr, f, f, t, $date, $date, NULL, f, t, t, t);" + +ynh_exec_as $app php$phpversion $final_path/daemon.php setAdmin $email #================================================= # GENERIC FINALIZATION