From c9300039840669ffbe98890749f253ddf2667aba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Thu, 28 Sep 2023 13:25:35 +0200 Subject: [PATCH] cleaning --- conf/systemd.service | 6 +++--- scripts/install | 21 ++------------------- scripts/remove | 5 +++-- 3 files changed, 8 insertions(+), 24 deletions(-) diff --git a/conf/systemd.service b/conf/systemd.service index 47af58b..9560cec 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -6,10 +6,10 @@ After=nginx.service network.target local-fs.target postgresql.service Type=simple User=__APP__ Group=__APP__ -Environment=PUBLIC_URL=https://__DOMAIN____PATH__/ -Environment=WS_PORT=__PORT__ +#Environment=PUBLIC_URL=https://__DOMAIN____PATH__/ +#Environment=WS_PORT=__PORT__ WorkingDirectory=__INSTALL_DIR__/ -ExecStart=/usr/bin/php__PHPVERSION__ daemon.php start --port=${WS_PORT} +ExecStart=/usr/bin/php__PHPVERSION__ daemon.php start StandardOutput=syslog SyslogIdentifier=__APP__ PIDFile=/run/movim.pid diff --git a/scripts/install b/scripts/install index 2187356..2db2dfc 100644 --- a/scripts/install +++ b/scripts/install @@ -53,17 +53,14 @@ ynh_script_progression --message="Configuring PHP-FPM..." # 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..." - # Create a dedicated NGINX config ynh_add_nginx_config # Create a dedicated systemd config ynh_add_systemd_config +yunohost service add $app --description="Responsive web-based XMPP client" --log="/var/log/$app/$app.log" + #================================================= # SPECIFIC SETUP #================================================= @@ -83,20 +80,6 @@ ynh_script_progression --message="Building Movim..." # Install composer ynh_install_composer -#ynh_exec_warn_less ynh_install_composer --phpversion="$phpversion" --workdir="$install_dir" - -#pushd $install_dir -# ynh_exec_as $app php$phpversion composer.phar install -#popd - -#================================================= -# GENERIC FINALIZATION -#================================================= -# INTEGRATE SERVICE IN YUNOHOST -#================================================= -ynh_script_progression --message="Integrating service in YunoHost..." - -yunohost service add $app --description="Responsive web-based XMPP client" --log="/var/log/$app/$app.log" #================================================= # START SYSTEMD SERVICE diff --git a/scripts/remove b/scripts/remove index e0f7443..9c92c69 100644 --- a/scripts/remove +++ b/scripts/remove @@ -10,10 +10,11 @@ source _common.sh source /usr/share/yunohost/helpers #================================================= -# STANDARD REMOVE +# REMOVE SYSTEM CONFIGURATIONS #================================================= -# REMOVE SERVICE INTEGRATION IN YUNOHOST +# REMOVE SYSTEMD SERVICE #================================================= +ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 # 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