From 71f42f2f6c805eeeb57d3178602d8edaec6f6688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 11 Mar 2023 12:47:55 +0100 Subject: [PATCH] Update install --- scripts/install | 31 +++++++------------------------ 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/scripts/install b/scripts/install index 639bb4b..1373409 100644 --- a/scripts/install +++ b/scripts/install @@ -38,21 +38,21 @@ chmod -R o-rwx "$install_dir" chown -R $app:www-data "$install_dir" #================================================= -# PHP-FPM CONFIGURATION +# SYSTEM CONFIGURATION #================================================= -ynh_script_progression --message="Configuring PHP-FPM..." --weight=2 +ynh_script_progression --message="Adding system configurations related to $app..." --weight=1 # Create a dedicated PHP-FPM config ynh_add_fpm_config --usage=$fpm_usage --footprint=$fpm_footprint -#================================================= -# NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Configuring NGINX web server..." --weight=2 - # Create a dedicated NGINX config ynh_add_nginx_config +# Create a dedicated systemd config +ynh_add_systemd_config + +yunohost service add $app --description="News feed reader and aggregator" --log="/var/log/$app/$app.log" + #================================================= # SPECIFIC SETUP #================================================= @@ -67,14 +67,6 @@ ynh_add_config --template="../conf/config.php" --destination="$install_dir/confi chmod 400 "$install_dir/config.php" chown $app "$install_dir/config.php" -#================================================= -# SETUP SYSTEMD -#================================================= -ynh_script_progression --message="Configuring a systemd service..." --weight=2 - -# Create a dedicated systemd config -ynh_add_systemd_config - #================================================= # INITIALIZE DATABASE #================================================= @@ -85,15 +77,6 @@ ynh_mysql_connect_as --user="$db_user" --password="$db_pwd" --database="$db_name ynh_exec_as $app php${phpversion} ${install_dir}/update.php --update-schema=force-yes -#================================================= -# GENERIC FINALIZATION -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 - -yunohost service add $app --description="News feed reader and aggregator" --log="/var/log/$app/$app.log" - #================================================= # START SYSTEMD SERVICE #=================================================