„install.sh“ ändern

This commit is contained in:
Yann Mölle 2023-04-18 19:50:40 +02:00
parent 82f7acf2cc
commit 2369ed3136

View File

@ -5,11 +5,11 @@ echo "#!/bin/bash" > zip_folder_daily.sh
echo "#Enter the directory to be zipped (e.g., /path/to/folder)" >> zip_folder_daily.sh echo "#Enter the directory to be zipped (e.g., /path/to/folder)" >> zip_folder_daily.sh
echo "Enter the directory to be zipped (e.g., /path/to/folder)" echo "Enter the directory to be zipped (e.g., /path/to/folder)"
read path read path
echo "SOURCE_DIR=" '$path' " " >> zip_folder_daily.sh echo "SOURCE_DIR=" $path " " >> zip_folder_daily.sh
echo "# Enter the directory where the zipped files will be stored (e.g., /path/to/archive)" >> zip_folder_daily.sh echo "# Enter the directory where the zipped files will be stored (e.g., /path/to/archive)" >> zip_folder_daily.sh
echo "Enter the directory where the zipped files will be stored (e.g., /path/to/archive)" echo "Enter the directory where the zipped files will be stored (e.g., /path/to/archive)"
read archive read archive
echo "ARCHIVE_DIR=" '$archive' "" >> zip_folder_daily.sh echo "ARCHIVE_DIR=" $archive "" >> zip_folder_daily.sh
echo "DATE=$(date +%Y-%m-%d)" >> zip_folder_daily.sh echo "DATE=$(date +%Y-%m-%d)" >> zip_folder_daily.sh
echo "zip -r "${ARCHIVE_DIR}/folder_${DATE}.zip" "${SOURCE_DIR}"" >> zip_folder_daily.sh echo "zip -r "${ARCHIVE_DIR}/folder_${DATE}.zip" "${SOURCE_DIR}"" >> zip_folder_daily.sh
echo "find "${ARCHIVE_DIR}" -name "folder_*.zip" -mtime +13 -exec rm {} \;" >> zip_folder_daily.sh echo "find "${ARCHIVE_DIR}" -name "folder_*.zip" -mtime +13 -exec rm {} \;" >> zip_folder_daily.sh