From fda7d9b154057dc8bbfed90502b6b100eb5fca4a Mon Sep 17 00:00:00 2001 From: Manuel Aranda Date: Wed, 12 Mar 2025 09:54:44 +0100 Subject: [PATCH 1/6] Updated changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb2e5f3..5ffeda8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # Changelog +## [0.9.1] - 2025-03-12 +### ⚡ Changed +- Se ha modificado el acceso a Mercure añadiendo nueva variable de entorno. + + ## [0.9.0] - 2025-3-4 ### 🔹 Added - Integracion con Mercure. Subscriber tanto en "Trazas" con en "Clientes". From 251708e21ec536c894a4e41c91d3e7e68a33a528 Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Thu, 13 Mar 2025 17:04:07 +0100 Subject: [PATCH 2/6] reates debian folder to create debian packages , refs #1708 Reviewed-on: https://ognproject.evlt.uma.es/gitea/opengnsys/oggui/pulls/14 --- .gitignore | 7 +++++++ DEBIAN/changelog | 5 ----- DEBIAN/control | 9 --------- DEBIAN/copyright | 21 --------------------- debian/changelog | 14 ++++++++++++++ debian/compat | 1 + debian/control | 13 +++++++++++++ debian/debhelper-build-stamp | 1 + debian/files | 2 ++ debian/oggui.config | 10 ++++++++++ debian/oggui.install | 9 +++++++++ DEBIAN/postinst => debian/oggui.postinst | 11 +++++++++++ DEBIAN/postrm => debian/oggui.postrm | 0 debian/oggui.postrm.debhelper | 6 ++++++ DEBIAN/preinst => debian/oggui.preinst | 0 debian/oggui.prerm | 14 ++++++++++++++ debian/oggui.templates | 5 +++++ debian/rules | 20 ++++++++++++++++++++ etc/nginx/oggui.conf | 5 +++-- 19 files changed, 116 insertions(+), 37 deletions(-) delete mode 100644 DEBIAN/changelog delete mode 100644 DEBIAN/control delete mode 100644 DEBIAN/copyright create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/debhelper-build-stamp create mode 100644 debian/files create mode 100644 debian/oggui.config create mode 100644 debian/oggui.install rename DEBIAN/postinst => debian/oggui.postinst (80%) rename DEBIAN/postrm => debian/oggui.postrm (100%) create mode 100644 debian/oggui.postrm.debhelper rename DEBIAN/preinst => debian/oggui.preinst (100%) create mode 100644 debian/oggui.prerm create mode 100644 debian/oggui.templates create mode 100755 debian/rules diff --git a/.gitignore b/.gitignore index 4e338bd..ac68a18 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,9 @@ ogWebconsole/.env ogWebconsole/test-results/ogGui-junit-report.xml +node_modules/ +### Debian packaging +debian/oggui +debian/*.substvars +debian/*.log +debian/.debhelper/ +debian/files diff --git a/DEBIAN/changelog b/DEBIAN/changelog deleted file mode 100644 index 65d538d..0000000 --- a/DEBIAN/changelog +++ /dev/null @@ -1,5 +0,0 @@ -oggui (1.0) unstable; urgency=low - - * Initial release. - - -- Your Name Thu, 01 Jan 1970 00:00:00 +0000 diff --git a/DEBIAN/control b/DEBIAN/control deleted file mode 100644 index 3bd121f..0000000 --- a/DEBIAN/control +++ /dev/null @@ -1,9 +0,0 @@ -Package: oggui -Version: %%VERSION%% -Section: base -Priority: optional -Architecture: all -Depends: nginx , npm , nodejs -Maintainer: Nicolas Arenas -Description: Description of the ogcore package - This is a longer description of the ogcore package. diff --git a/DEBIAN/copyright b/DEBIAN/copyright deleted file mode 100644 index 97ef204..0000000 --- a/DEBIAN/copyright +++ /dev/null @@ -1,21 +0,0 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: ogcore -Source: - -Files: * -Copyright: 2023 Your Name -License: GPL-3+ - This package is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - . - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - . - You should have received a copy of the GNU General Public License - along with this package; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, - MA 02110-1301 USA. diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..4163d19 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,14 @@ +oggui (1.0.1+deb-pkg20250310-1) unstable; urgency=medium + + * Add debian files + * Update .gitignore + * refs #1637 refactor: remove unused client edit and create components; add manage client component + * refs #1619. Style: enhance cards view layout and paginator integration in groups component + * refactor: update paginator settings and improve page change handling in groups component + * Merge branch 'develop' of ssh://ognproject.evlt.uma.es:21987/opengnsys/oggui into develop + * style: clean up and optimize CSS for groups component; enhance HTML structure and improve responsiveness + * Updated groups paginator + * Merge branch 'develop' of ssh://ognproject.evlt.uma.es:21987/opengnsys/oggui into develop + * refs #1567. New subnet field: 'dns' + + -- Tu Nombre Mon, 10 Mar 2025 14:48:36 +0000 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..48082f7 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +12 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..629ce11 --- /dev/null +++ b/debian/control @@ -0,0 +1,13 @@ +Source: oggui +Section: web +Priority: optional +Maintainer: Nicolas Arenas +Build-Depends: debhelper (>= 12), nodejs, npm +Standards-Version: 4.5.0 + +Package: oggui +Architecture: any +Maintainer: Nicolas Arenas +Depends: ${shlibs:Depends}, ${misc:Depends}, nginx, nodejs, npm +Description: OpenGnsys GUI + Una interfaz gráfica para OpenGnsys. diff --git a/debian/debhelper-build-stamp b/debian/debhelper-build-stamp new file mode 100644 index 0000000..f1164bb --- /dev/null +++ b/debian/debhelper-build-stamp @@ -0,0 +1 @@ +oggui diff --git a/debian/files b/debian/files new file mode 100644 index 0000000..4d6bb5d --- /dev/null +++ b/debian/files @@ -0,0 +1,2 @@ +oggui_1.0.1+deb-pkg20250310-1_amd64.buildinfo web optional +oggui_1.0.1+deb-pkg20250310-1_amd64.deb web optional diff --git a/debian/oggui.config b/debian/oggui.config new file mode 100644 index 0000000..f0fa9f6 --- /dev/null +++ b/debian/oggui.config @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +db_input high opengnsys/oggui_ogcoreUrl || true + + +db_go diff --git a/debian/oggui.install b/debian/oggui.install new file mode 100644 index 0000000..a14cbae --- /dev/null +++ b/debian/oggui.install @@ -0,0 +1,9 @@ +ogWebconsole/dist/oggui/browser /opt/opengnsys/oggui/browser/ +etc /opt/opengnsys/oggui/ +bin /opt/opengnsys/oggui/ +var /opt/opengnsys/oggui/ +ogWebconsole/*.json /opt/opengnsys/oggui/src/ +ogWebconsole/*.js /opt/opengnsys/oggui/src/ +ogWebconsole/src /opt/opengnsys/oggui/src/ +ogWebconsole/ssl/* /opt/opengnsys/oggui/etc/nginx/certs/ + diff --git a/DEBIAN/postinst b/debian/oggui.postinst similarity index 80% rename from DEBIAN/postinst rename to debian/oggui.postinst index 393ab12..651dcb6 100644 --- a/DEBIAN/postinst +++ b/debian/oggui.postinst @@ -2,17 +2,24 @@ set -e +. /usr/share/debconf/confmodule + +db_get opengnsys/oggui_ogcoreUrl +OGCORE_URL="$RET" # Asegurarse de que el usuario exista USER="opengnsys" HASH_FILE="/opt/opengnsys/oggui/var/lib/oggui/oggui.config.hash" CONFIG_FILE="/opt/opengnsys/oggui/src/.env" + + # Provisionar base de datos si es necesario en caso de instalación. # Detectar si es una instalación nueva o una actualización if [ "$1" = "configure" ] && [ -z "$2" ]; then cd /opt/opengnsys/oggui/src/ + echo NG_APP_BASE_API_URL=$OGCORE_URL > "$CONFIG_FILE" npm install -g @angular/cli npm install /usr/local/bin/ng build --base-href=/ --output-path=dist/oggui --optimization=true --configuration=production --localize=false @@ -29,8 +36,12 @@ fi # Cambiar la propiedad de los archivos al usuario especificado chown opengnsys:www-data /opt/opengnsys/ chown -R opengnsys:www-data /opt/opengnsys/oggui +chmod 755 /opt/opengnsys/oggui/bin/start-oggui.sh # Install http server stuff ln -s /opt/opengnsys/oggui/etc/nginx/oggui.conf /etc/nginx/sites-enabled/oggui.conf +mkdir -p /etc/nginx/certs/ +cp -p /opt/opengnsys/oggui/etc/nginx/certs/* /etc/nginx/certs/ +chown -R www-data:www-data /etc/nginx/certs # Reiniciar servicios si es necesario # systemctl restart nombre_del_servicio diff --git a/DEBIAN/postrm b/debian/oggui.postrm similarity index 100% rename from DEBIAN/postrm rename to debian/oggui.postrm diff --git a/debian/oggui.postrm.debhelper b/debian/oggui.postrm.debhelper new file mode 100644 index 0000000..9535d85 --- /dev/null +++ b/debian/oggui.postrm.debhelper @@ -0,0 +1,6 @@ +# Automatically added by dh_installdebconf/13.14.1ubuntu5 +if [ "$1" = purge ] && [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge +fi +# End automatically added section diff --git a/DEBIAN/preinst b/debian/oggui.preinst similarity index 100% rename from DEBIAN/preinst rename to debian/oggui.preinst diff --git a/debian/oggui.prerm b/debian/oggui.prerm new file mode 100644 index 0000000..2f86a9f --- /dev/null +++ b/debian/oggui.prerm @@ -0,0 +1,14 @@ +#!/bin/bash + +set -e +set -x + +if [ "$1" = "upgrade" ]; then + # Eliminar enlaces simbólicos creados en postinst + rm -f /etc/systemd/system/oggui.service + rm -f /etc/nginx/sites-enabled/oggui.conf + systemctl daemon-reload + systemctl restart nginx +fi + +exit 0 diff --git a/debian/oggui.templates b/debian/oggui.templates new file mode 100644 index 0000000..b4e5863 --- /dev/null +++ b/debian/oggui.templates @@ -0,0 +1,5 @@ +Template: opengnsys/oggui_ogcoreUrl +Type: string +Default: https://127.0.0.1:8443 +Description: Introduzca la URL delAPI de OgCore + diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..e98db95 --- /dev/null +++ b/debian/rules @@ -0,0 +1,20 @@ +#!/usr/bin/make -f + +%: + dh $@ + +override_dh_auto_build: + cd ogWebconsole && npm install + cd ogWebconsole && /usr/local/bin/ng build --base-href=/ --output-path=dist/oggui --optimization=true --configuration=production --localize=false + +override_dh_auto_install: + dh_auto_install + mkdir -p debian/oggui/opt/opengnsys/oggui/browser + mkdir -p debian/oggui/opt/opengnsys/oggui/src/ + cp -pr ogWebconsole/dist/oggui/browser/* debian/oggui/opt/opengnsys/oggui/browser/ + rm -rf debian/oggui/opt/opengnsys/oggui/browser/node_modules + cp -pr etc debian/oggui/opt/opengnsys/oggui/ + cp -pr bin debian/oggui/opt/opengnsys/oggui/ + cp -pr var debian/oggui/opt/opengnsys/oggui/ + cp -p ogWebconsole/.env debian/oggui/opt/opengnsys/oggui/src/ + md5sum debian/oggui/opt/opengnsys/oggui/src/.env > debian/oggui/opt/opengnsys/oggui/var/lib/oggui/oggui.config.hash diff --git a/etc/nginx/oggui.conf b/etc/nginx/oggui.conf index e036513..2f25085 100644 --- a/etc/nginx/oggui.conf +++ b/etc/nginx/oggui.conf @@ -1,5 +1,5 @@ server { - listen 4200; + listen 4200 ssl; server_name localhost; root /opt/opengnsys/oggui/browser; @@ -13,7 +13,8 @@ server { location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { try_files $uri =404; } - + ssl_certificate /opt/opengnsys/oggui/etc/nginx/certs/oggui.uds-test.net.crt.pem; + ssl_certificate_key /opt/opengnsys/oggui/etc/nginx/certs/oggui.uds-test.net.key.pem; # Configuración para evitar problemas con rutas de Angular error_page 404 /index.html; } \ No newline at end of file From 06f969f43f78faf58d73447265231a8bb1a55f67 Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Tue, 18 Mar 2025 10:56:19 +0100 Subject: [PATCH 3/6] jenkins-deb (#15) Include Jenkinsfile in main branch Reviewed-on: https://ognproject.evlt.uma.es/gitea/opengnsys/oggui/pulls/15 refs #1715 --- Jenkins/Jenkinsfile-deb-pkg | 77 +++++++++++++++++++++++++++++++++++++ debian/changelog | 2 +- 2 files changed, 78 insertions(+), 1 deletion(-) create mode 100644 Jenkins/Jenkinsfile-deb-pkg diff --git a/Jenkins/Jenkinsfile-deb-pkg b/Jenkins/Jenkinsfile-deb-pkg new file mode 100644 index 0000000..59886e4 --- /dev/null +++ b/Jenkins/Jenkinsfile-deb-pkg @@ -0,0 +1,77 @@ +@Library('jenkins-shared-library') _ +pipeline { + agent { + label 'jenkins-slave' + } + environment { + DEBIAN_FRONTEND = 'noninteractive' + DEFAULT_DEV_NAME = 'Opengnsys Team' + DEFAULT_DEV_EMAIL = 'opengnsys@qindel.com' + } + options { + skipDefaultCheckout() + } + parameters { + string(name: 'DEV_NAME', defaultValue: '', description: 'Nombre del desarrollador') + string(name: 'DEV_EMAIL', defaultValue: '', description: 'Email del desarrollador') + } + stages { + stage('Prepare Workspace') { + steps { + script { + env.BUILD_DIR = "${WORKSPACE}/oggui" + sh "mkdir -p ${env.BUILD_DIR}" + } + } + } + + stage('Checkout') { + steps { + dir("${env.BUILD_DIR}") { + checkout scm + } + } + } + + stage('Generate Changelog') { + when { + expression { + return env.TAG_NAME != null + } + } + steps { + script { + def devName = params.DEV_NAME ? params.DEV_NAME : env.DEFAULT_DEV_NAME + def devEmail = params.DEV_EMAIL ? params.DEV_EMAIL : env.DEFAULT_DEV_EMAIL + + generateDebianChangelog(env.BUILD_DIR, devName, devEmail) + } + } + } + + stage('Build') { + steps { + dir("${env.BUILD_DIR}") { + sh ''' + dpkg-buildpackage -us -uc + mkdir -p ../artifacts && mv ../*.deb ../*.changes ../*.buildinfo ../artifacts/ + ssh aptly@172.17.8.68 "rm -rf /var/tmp/opengnsys/debian-repo && mkdir -p /var/tmp/opengnsys/debian-repo" + scp -r ../artifacts/* aptly@172.17.8.68:/var/tmp/opengnsys/debian-repo/ + ''' + } + } + } + } + post { + always { + notifyBuildStatus('narenas@qindel.com') + } + } +} +// stage ('Publish to Debian Repository') { +// agent { label 'debian-repo' } +// steps { +// sh "aptly repo add opengnsys-devel /var/tmp/opengnsys/debian-repo/*.deb" +// } +// } + diff --git a/debian/changelog b/debian/changelog index 4163d19..ecbbe3d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -oggui (1.0.1+deb-pkg20250310-1) unstable; urgency=medium +oggui (0.0.1-1) unstable; urgency=medium * Add debian files * Update .gitignore From d4eec6e5ff6346ae2f9407dd1b475b9cb33ace35 Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Wed, 19 Mar 2025 12:28:22 +0100 Subject: [PATCH 4/6] jenkins_upload_packages (#16) Uploads packages Reviewed-on: https://ognproject.evlt.uma.es/gitea/opengnsys/oggui/pulls/16 refers #1313 --- CHANGELOG.md | 4 ++++ Jenkins/Jenkinsfile-deb-pkg | 21 +++++++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ffeda8..8d9ea42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Changelog +## [0.9.2] - 2025-03-19 +### Changed +- Jenkinsfile to pubilsh packages in repo in case og release + ## [0.9.1] - 2025-03-12 ### ⚡ Changed - Se ha modificado el acceso a Mercure añadiendo nueva variable de entorno. diff --git a/Jenkins/Jenkinsfile-deb-pkg b/Jenkins/Jenkinsfile-deb-pkg index 59886e4..f032770 100644 --- a/Jenkins/Jenkinsfile-deb-pkg +++ b/Jenkins/Jenkinsfile-deb-pkg @@ -55,12 +55,23 @@ pipeline { sh ''' dpkg-buildpackage -us -uc mkdir -p ../artifacts && mv ../*.deb ../*.changes ../*.buildinfo ../artifacts/ - ssh aptly@172.17.8.68 "rm -rf /var/tmp/opengnsys/debian-repo && mkdir -p /var/tmp/opengnsys/debian-repo" - scp -r ../artifacts/* aptly@172.17.8.68:/var/tmp/opengnsys/debian-repo/ + ssh aptly@172.17.8.68 "rm -rf /var/tmp/opengnsys/debian-repo/oggui && mkdir -p /var/tmp/opengnsys/debian-repo/oggui" + scp -r ../artifacts/* aptly@172.17.8.68:/var/tmp/opengnsys/debian-repo/oggui/ ''' } } } + stage ('Publish to Debian Repository') { + when { + expression { + return env.TAG_NAME != null + } + } + agent { label 'debian-repo' } + steps { + sh "aptly repo add opengnsys-devel /var/tmp/opengnsys/debian-repo/oggui/*.deb" + } + } } post { always { @@ -68,10 +79,4 @@ pipeline { } } } -// stage ('Publish to Debian Repository') { -// agent { label 'debian-repo' } -// steps { -// sh "aptly repo add opengnsys-devel /var/tmp/opengnsys/debian-repo/*.deb" -// } -// } From 2f968499f63610a85a78051a029ce6881293b43a Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Thu, 20 Mar 2025 10:46:35 +0100 Subject: [PATCH 5/6] jenkins_upload_packages (#17) Reviewed-on: https://ognproject.evlt.uma.es/gitea/opengnsys/oggui/pulls/17 --- debian/oggui.config | 1 + debian/oggui.postinst | 6 +++++- debian/oggui.templates | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/debian/oggui.config b/debian/oggui.config index f0fa9f6..a938da8 100644 --- a/debian/oggui.config +++ b/debian/oggui.config @@ -5,6 +5,7 @@ set -e . /usr/share/debconf/confmodule db_input high opengnsys/oggui_ogcoreUrl || true +db_input high opengnsys/oggui_ogmercureUrl || true db_go diff --git a/debian/oggui.postinst b/debian/oggui.postinst index 651dcb6..fac41ce 100644 --- a/debian/oggui.postinst +++ b/debian/oggui.postinst @@ -6,6 +6,9 @@ set -e db_get opengnsys/oggui_ogcoreUrl OGCORE_URL="$RET" +db_get opengnsys/oggui_ogmercureUrl +OGMERCURE_URL="$RET" + # Asegurarse de que el usuario exista USER="opengnsys" HASH_FILE="/opt/opengnsys/oggui/var/lib/oggui/oggui.config.hash" @@ -20,10 +23,11 @@ CONFIG_FILE="/opt/opengnsys/oggui/src/.env" if [ "$1" = "configure" ] && [ -z "$2" ]; then cd /opt/opengnsys/oggui/src/ echo NG_APP_BASE_API_URL=$OGCORE_URL > "$CONFIG_FILE" + echo NG_APP_OGCORE_MERCURE_BASE_URL=$OGMERCURE_URL >> "$CONFIG_FILE" npm install -g @angular/cli npm install /usr/local/bin/ng build --base-href=/ --output-path=dist/oggui --optimization=true --configuration=production --localize=false - cp -pr /opt/opengnsys/oggui/src/dist/oggui/browser/* /opt/opengnsys/oggui/browser/ + cp -pr /opt/opengnsys/oggui/src/dist/oggui/browser/* /opt/opengnsys/oggui/ md5sum "$CONFIG_FILE" > "$HASH_FILE" ln -s /opt/opengnsys/oggui/etc/systemd/system/oggui.service /etc/systemd/system/oggui.service systemctl daemon-reload diff --git a/debian/oggui.templates b/debian/oggui.templates index b4e5863..dc0d172 100644 --- a/debian/oggui.templates +++ b/debian/oggui.templates @@ -3,3 +3,7 @@ Type: string Default: https://127.0.0.1:8443 Description: Introduzca la URL delAPI de OgCore +Template: opengnsys/oggui_ogmercureUrl +Type: string +Default: https://127.0.0.1:3000/.well-known/mercure +Description: Introduzca el endpoint de mercure From 84863cb0ac62067012db45cbed760f6ec341e35b Mon Sep 17 00:00:00 2001 From: Nicolas Arenas Date: Fri, 21 Mar 2025 14:51:15 +0100 Subject: [PATCH 6/6] Updated oggui debian install --- debian/oggui.postinst | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/debian/oggui.postinst b/debian/oggui.postinst index fac41ce..c873baf 100644 --- a/debian/oggui.postinst +++ b/debian/oggui.postinst @@ -14,11 +14,6 @@ USER="opengnsys" HASH_FILE="/opt/opengnsys/oggui/var/lib/oggui/oggui.config.hash" CONFIG_FILE="/opt/opengnsys/oggui/src/.env" - - -# Provisionar base de datos si es necesario en caso de instalación. - - # Detectar si es una instalación nueva o una actualización if [ "$1" = "configure" ] && [ -z "$2" ]; then cd /opt/opengnsys/oggui/src/ @@ -27,29 +22,29 @@ if [ "$1" = "configure" ] && [ -z "$2" ]; then npm install -g @angular/cli npm install /usr/local/bin/ng build --base-href=/ --output-path=dist/oggui --optimization=true --configuration=production --localize=false - cp -pr /opt/opengnsys/oggui/src/dist/oggui/browser/* /opt/opengnsys/oggui/ + cp -pr /opt/opengnsys/oggui/src/dist/oggui/browser /opt/opengnsys/oggui/ md5sum "$CONFIG_FILE" > "$HASH_FILE" ln -s /opt/opengnsys/oggui/etc/systemd/system/oggui.service /etc/systemd/system/oggui.service + ln -s /opt/opengnsys/oggui/etc/nginx/oggui.conf /etc/nginx/sites-enabled/oggui.conf + mkdir -p /etc/nginx/certs/ + cp -p /opt/opengnsys/oggui/etc/nginx/certs/* /etc/nginx/certs/ + chown -R www-data:www-data /etc/nginx/certs systemctl daemon-reload systemctl enable oggui + # systemctl restart nombre_del_s + systemctl daemon-reload + systemctl restart nginx elif [ "$1" = "configure" ] && [ -n "$2" ]; then cd /opt/opengnsys/oggui echo "Actualización desde la versión $2" + /usr/local/bin/ng build --base-href=/ --output-path=dist/oggui --optimization=true --configuration=production --localize=false + rm -rf /opt/opengnsys/oggui/browser + cp -pr /opt/opengnsys/oggui/src/dist/oggui/browser /opt/opengnsys/oggui/ + md5sum "$CONFIG_FILE" > "$HASH_FILE" fi # Cambiar la propiedad de los archivos al usuario especificado chown opengnsys:www-data /opt/opengnsys/ chown -R opengnsys:www-data /opt/opengnsys/oggui chmod 755 /opt/opengnsys/oggui/bin/start-oggui.sh -# Install http server stuff -ln -s /opt/opengnsys/oggui/etc/nginx/oggui.conf /etc/nginx/sites-enabled/oggui.conf -mkdir -p /etc/nginx/certs/ -cp -p /opt/opengnsys/oggui/etc/nginx/certs/* /etc/nginx/certs/ -chown -R www-data:www-data /etc/nginx/certs -# Reiniciar servicios si es necesario -# systemctl restart nombre_del_servicio - -systemctl daemon-reload -systemctl restart nginx - exit 0