|
|
|
@ -88,9 +88,9 @@ function sair_instalacao(){
|
|
|
|
|
|
|
|
|
|
/bin/rm -rf /tmp/sip_install.pid |
|
|
|
|
cd $path_arquivo |
|
|
|
|
rm -rf "$(find $path_arquivo/* -maxdepth 1 -type d)" |
|
|
|
|
rm -rf "$(find $path_arquivo/* -iname \"*.tar.gz\")" |
|
|
|
|
rm -rf /database |
|
|
|
|
$ rm -rf "$(find $path_arquivo/* -maxdepth 1 -type d)" |
|
|
|
|
$ rm -rf "$(find $path_arquivo/* -iname \"*.tar.gz\")" |
|
|
|
|
$ rm -rf /database |
|
|
|
|
|
|
|
|
|
exit $1 |
|
|
|
|
} |
|
|
|
@ -487,12 +487,13 @@ function server_postgresql(){
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function inserir_sql(){ |
|
|
|
|
cd /var/lib/postgresql/ |
|
|
|
|
|
|
|
|
|
file_sql=$(find /${TAR_DATABASE:0:-7}/* -type f ) |
|
|
|
|
for sql in $file_sql; |
|
|
|
|
do |
|
|
|
|
echo "$sql" |
|
|
|
|
sudo -u postgres psql -d pbx -f $sql |
|
|
|
|
sudo -u postgres psql -d pbx -f "$sql" |
|
|
|
|
[ $? -eq 0 ] && sair_instalacao |
|
|
|
|
done |
|
|
|
|
|
|
|
|
|