From ddb1432fa774c8d098d11ba88879910c8efa79ba Mon Sep 17 00:00:00 2001 From: Christian Tosta Date: Tue, 3 Jun 2025 15:05:09 -0300 Subject: [PATCH] Ajustes SigERP (db user) e SigPDV (CliSiTef) --- sig-installer | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/sig-installer b/sig-installer index 85a0123..524bd66 100644 --- a/sig-installer +++ b/sig-installer @@ -3,7 +3,7 @@ set -euo pipefail self=$(basename ${0}) self=${self/.*bash} -version=2505.6 +version=2506.1 # == Funções Gerais ============================================================================== # @@ -593,7 +593,7 @@ function produto.install { # Runner and systemd units download "installer/config/${PRODUTO}/sigerp-runner-pyenv-${_pdpy}.sh" \ "/srv/sig/${PRODUTO}/sigerp-runner" \ - && chmod +x "/srv/sig/${PRODUTO}/sigerp-runner" \ + && chmod +x "/srv/sig/${PRODUTO}/sigerp-runner" \ && ln -snf \ "/srv/sig/${PRODUTO}/sigerp-runner" \ "/usr/local/bin/sigerp-runner" @@ -626,21 +626,29 @@ function produto.install { -x "${CACHEDIR}/${PRODUTO}/artwork-sigerp.zip" # Runtime dependencies - SIGERP_PACKAGES="libmysqlclient21" + SIGERP_PACKAGES="\ + atop \ + libmysqlclient21 \ + net-tools \ + rclone \ + tmate \ + vim-nox \ + " system.install_pkgs ${SIGERP_PACKAGES} # Create/Alter PostgreSQL user + local _dbuser="openerp" local _password=$(openssl rand -base64 32 | sed 's/\//|/g') ${ui}.status info $"Criando/Atualizando usuário do banco de dados [%s]" ${PRODUTO} sudo -iu postgres \ psql -c \ - "CREATE USER ${PRODUTO} WITH \ + "CREATE USER ${_dbuser} WITH \ PASSWORD '${_password}' \ CREATEDB;" \ || \ sudo -iu postgres \ psql -c \ - "ALTER USER ${PRODUTO} WITH \ + "ALTER USER ${_dbuser} WITH \ PASSWORD '${_password}' \ CREATEDB;" @@ -664,11 +672,13 @@ function produto.install { # TODO: Simplificar essa baderna SIGPV_PACKAGES=" atop \ + libmysqlclient21 \ mousepad \ net-tools \ qt5dxcb-plugin \ system-config-printer \ terminator \ + rclone \ tmate \ vim-nox \ " @@ -735,6 +745,11 @@ function produto.install { download "installer/config/${PRODUTO}/CliSiTef.ini" \ "/usr/local/sigext/CliSiTef.ini" + for amb in homologacao producao lib_ssl_antiga; do + ln -snf \ + "/usr/local/sigext/CliSiTef.ini" \ + /srv/sig/${PRODUTO}/sigtef/lib_x86_64/${amb}/ + done # PostgreSQL user and database local _password=$(openssl rand -base64 32 | sed 's/\//|/g')