Actualización

This commit is contained in:
Your Name
2024-10-07 19:31:30 +00:00
parent 189566ce16
commit e5715e3b05
108 changed files with 27751 additions and 26012 deletions

View File

@@ -1,23 +1,23 @@
#!/bin/bash
# Source and destination directories
SRC_DIR="/var/lib/pgsql/15/data/log/"
DEST_DIR="/usr/share/nginx/html/paad/pgsql-log/"
# Days of the week
DAYS=("Mon" "Tue" "Wed" "Thu" "Fri" "Sat" "Sun")
echo "Done"
# Iterate over each day and copy the file if it exists
for day in "${DAYS[@]}"; do
src_file="${SRC_DIR}postgresql-${day}.log"
dest_file="${DEST_DIR}postgresql-${day}.log"
if [[ -f "$src_file" ]]; then
sudo cp "$src_file" "$dest_file"
echo "Copied ${src_file} to ${dest_file}"
else
echo "File ${src_file} not found"
fi
done
#!/bin/bash
# Source and destination directories
SRC_DIR="/var/lib/pgsql/15/data/log/"
DEST_DIR="/usr/share/nginx/html/paad/pgsql-log/"
# Days of the week
DAYS=("Mon" "Tue" "Wed" "Thu" "Fri" "Sat" "Sun")
echo "Done"
# Iterate over each day and copy the file if it exists
for day in "${DAYS[@]}"; do
src_file="${SRC_DIR}postgresql-${day}.log"
dest_file="${DEST_DIR}postgresql-${day}.log"
if [[ -f "$src_file" ]]; then
sudo cp "$src_file" "$dest_file"
echo "Copied ${src_file} to ${dest_file}"
else
echo "File ${src_file} not found"
fi
done