Delete old DEBIAN repository
testing/ogcore-api/pipeline/head This commit looks good
Details
testing/ogcore-api/pipeline/head This commit looks good
Details
parent
4dbedd28d6
commit
1f8dedb274
|
@ -1,5 +0,0 @@
|
|||
ogcore (1.0) unstable; urgency=low
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- Your Name <your.email@example.com> Thu, 01 Jan 1970 00:00:00 +0000
|
|
@ -1,12 +0,0 @@
|
|||
Package: ogcore
|
||||
Version: %%VERSION%%
|
||||
Section: base
|
||||
Priority: optional
|
||||
Architecture: all
|
||||
Depends: mariadb-server, systemd, nginx, libzip-dev, zip, unzip, php8.3-opcache,
|
||||
php8.3-bcmath, php8.3-cli, php8.3-curl, php8.3-fpm, php8.3-gd,
|
||||
php8.3-ldap, php8.3-mbstring, php8.3-mysql, php8.3-common,
|
||||
php8.3-xml, php8.3-zip
|
||||
Maintainer: Nicolas Arenas <nicolas.arenas@qindel.com>
|
||||
Description: Description of the ogcore package
|
||||
This is a longer description of the ogcore package.
|
|
@ -1,21 +0,0 @@
|
|||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: ogcore
|
||||
Source: <source URL>
|
||||
|
||||
Files: *
|
||||
Copyright: 2023 Your Name <your.email@example.com>
|
||||
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.
|
|
@ -1,54 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Asegurarse de que el usuario exista
|
||||
USER="opengnsys"
|
||||
|
||||
|
||||
# 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/ogcore/api
|
||||
mariadb -e "GRANT ALL ON *.* to 'root'@'localhost' IDENTIFIED BY 'root' WITH GRANT OPTION;"
|
||||
echo "Primera instalación"
|
||||
# Provisionar base de datos si es necesario en caso de instalación.
|
||||
echo "Creando par de claves para JWT"
|
||||
php bin/console lexik:jwt:generate-keypair --overwrite
|
||||
echo "Creando base de datos y cargando datos iniciales"
|
||||
php bin/console doctrine:database:create --if-not-exists
|
||||
php bin/console doctrine:migrations:migrate --no-interaction
|
||||
# Cargar datos iniciales
|
||||
echo "Cargando datos iniciales"
|
||||
php bin/console opengnsys:load-default-user
|
||||
|
||||
echo "Cargando usuarios y grupos por defecto"
|
||||
php bin/console app:load-default-user-groups
|
||||
echo "Cargando comandos por defecto"
|
||||
php bin/console app:load-default-commands
|
||||
echo "Cargando menú por defecto"
|
||||
php bin/console opengnsys:load-default-menu
|
||||
elif [ "$1" = "configure" ] && [ -n "$2" ]; then
|
||||
cd /opt/opengnsys/ogcore/api
|
||||
echo "Actualización desde la versión $2"
|
||||
# Ejecutar comandos específicos para la actualización
|
||||
php bin/console doctrine:migrations:migrate --no-interaction
|
||||
# Otros comandos específicos para la actualización
|
||||
fi
|
||||
|
||||
# Cambiar la propiedad de los archivos al usuario especificado
|
||||
chown opengnsys:www-data /opt/opengnsys/
|
||||
chown -R opengnsys:www-data /opt/opengnsys/ogcore
|
||||
# Install http server stuff
|
||||
ln -s /opt/opengnsys/ogcore/etc/nginx/sites-available/ogcore.conf /etc/nginx/sites-enabled/ogcore.conf
|
||||
ln -s /opt/opengnsys/ogcore/etc/php/8.3/fpm/pool.d/ogcore-fpm.conf /etc/php/8.3/fpm/pool.d/ogcore-fpm.conf
|
||||
# Reiniciar servicios si es necesario
|
||||
# systemctl restart nombre_del_servicio
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl restart nginx
|
||||
systemctl restart php8.3-fpm
|
||||
|
||||
exit 0
|
|
@ -1,15 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
# Asegurarse de que el usuario exista
|
||||
USER="opengnsys"
|
||||
HOME_DIR="/opt/opengnsys"
|
||||
if id "$USER" &>/dev/null; then
|
||||
echo "El usuario $USER ya existe."
|
||||
else
|
||||
echo "Creando el usuario $USER con home en $HOME_DIR."
|
||||
useradd -m -d "$HOME_DIR" -s /bin/bash "$USER"
|
||||
fi
|
||||
|
||||
exit 0
|
Loading…
Reference in New Issue