Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16cc315bd6 |
@@ -3,7 +3,7 @@
|
||||
set -euo pipefail
|
||||
self=$(basename ${0})
|
||||
self=${self/.*bash}
|
||||
version=2505.6
|
||||
version=2506.1
|
||||
|
||||
# == Funções Gerais ============================================================================== #
|
||||
|
||||
@@ -574,6 +574,7 @@ function produto.install {
|
||||
sigerp)
|
||||
_date=$(date +%Y%m%d%H%M%S)
|
||||
_pdpy=$(parsers.yaml ${CACHEDIR}/produtos.yml "produtos.${PRODUTO}.python")
|
||||
_dbuser="openerp"
|
||||
|
||||
# Addons SigERP
|
||||
[[ -d "/srv/sig/${PRODUTO}/addons" ]] && \
|
||||
@@ -626,7 +627,14 @@ 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
|
||||
@@ -634,13 +642,13 @@ function produto.install {
|
||||
${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')
|
||||
|
||||
Reference in New Issue
Block a user