Compare commits
1 Commits
4896c23a60
...
v2506.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16cc315bd6 |
@@ -3,7 +3,7 @@
|
|||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
self=$(basename ${0})
|
self=$(basename ${0})
|
||||||
self=${self/.*bash}
|
self=${self/.*bash}
|
||||||
version=2505.6
|
version=2506.1
|
||||||
|
|
||||||
# == Funções Gerais ============================================================================== #
|
# == Funções Gerais ============================================================================== #
|
||||||
|
|
||||||
@@ -574,6 +574,7 @@ function produto.install {
|
|||||||
sigerp)
|
sigerp)
|
||||||
_date=$(date +%Y%m%d%H%M%S)
|
_date=$(date +%Y%m%d%H%M%S)
|
||||||
_pdpy=$(parsers.yaml ${CACHEDIR}/produtos.yml "produtos.${PRODUTO}.python")
|
_pdpy=$(parsers.yaml ${CACHEDIR}/produtos.yml "produtos.${PRODUTO}.python")
|
||||||
|
_dbuser="openerp"
|
||||||
|
|
||||||
# Addons SigERP
|
# Addons SigERP
|
||||||
[[ -d "/srv/sig/${PRODUTO}/addons" ]] && \
|
[[ -d "/srv/sig/${PRODUTO}/addons" ]] && \
|
||||||
@@ -626,7 +627,14 @@ function produto.install {
|
|||||||
-x "${CACHEDIR}/${PRODUTO}/artwork-sigerp.zip"
|
-x "${CACHEDIR}/${PRODUTO}/artwork-sigerp.zip"
|
||||||
|
|
||||||
# Runtime dependencies
|
# Runtime dependencies
|
||||||
SIGERP_PACKAGES="libmysqlclient21"
|
SIGERP_PACKAGES="\
|
||||||
|
atop \
|
||||||
|
libmysqlclient21 \
|
||||||
|
net-tools \
|
||||||
|
rclone \
|
||||||
|
tmate \
|
||||||
|
vim-nox \
|
||||||
|
"
|
||||||
system.install_pkgs ${SIGERP_PACKAGES}
|
system.install_pkgs ${SIGERP_PACKAGES}
|
||||||
|
|
||||||
# Create/Alter PostgreSQL user
|
# Create/Alter PostgreSQL user
|
||||||
@@ -634,13 +642,13 @@ function produto.install {
|
|||||||
${ui}.status info $"Criando/Atualizando usuário do banco de dados [%s]" ${PRODUTO}
|
${ui}.status info $"Criando/Atualizando usuário do banco de dados [%s]" ${PRODUTO}
|
||||||
sudo -iu postgres \
|
sudo -iu postgres \
|
||||||
psql -c \
|
psql -c \
|
||||||
"CREATE USER ${PRODUTO} WITH \
|
"CREATE USER ${dbuser} WITH \
|
||||||
PASSWORD '${_password}' \
|
PASSWORD '${_password}' \
|
||||||
CREATEDB;" \
|
CREATEDB;" \
|
||||||
|| \
|
|| \
|
||||||
sudo -iu postgres \
|
sudo -iu postgres \
|
||||||
psql -c \
|
psql -c \
|
||||||
"ALTER USER ${PRODUTO} WITH \
|
"ALTER USER ${dbuser} WITH \
|
||||||
PASSWORD '${_password}' \
|
PASSWORD '${_password}' \
|
||||||
CREATEDB;"
|
CREATEDB;"
|
||||||
|
|
||||||
@@ -664,11 +672,13 @@ function produto.install {
|
|||||||
# TODO: Simplificar essa baderna
|
# TODO: Simplificar essa baderna
|
||||||
SIGPV_PACKAGES="
|
SIGPV_PACKAGES="
|
||||||
atop \
|
atop \
|
||||||
|
libmysqlclient21 \
|
||||||
mousepad \
|
mousepad \
|
||||||
net-tools \
|
net-tools \
|
||||||
qt5dxcb-plugin \
|
qt5dxcb-plugin \
|
||||||
system-config-printer \
|
system-config-printer \
|
||||||
terminator \
|
terminator \
|
||||||
|
rclone \
|
||||||
tmate \
|
tmate \
|
||||||
vim-nox \
|
vim-nox \
|
||||||
"
|
"
|
||||||
@@ -735,6 +745,11 @@ function produto.install {
|
|||||||
|
|
||||||
download "installer/config/${PRODUTO}/CliSiTef.ini" \
|
download "installer/config/${PRODUTO}/CliSiTef.ini" \
|
||||||
"/usr/local/sigext/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
|
# PostgreSQL user and database
|
||||||
local _password=$(openssl rand -base64 32 | sed 's/\//|/g')
|
local _password=$(openssl rand -base64 32 | sed 's/\//|/g')
|
||||||
|
|||||||
Reference in New Issue
Block a user