-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
22 lines (21 loc) · 876 Bytes
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
echo checking if Zip is installed
apt-get install zip -y
yum install zip -y
apk add zip
cd /opt/
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)"
read path
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)"
read archive
echo "ARCHIVE_DIR='"$archive"'" >> zip_folder_daily.sh
curl https://git.moelle.space/hxcde/folder2archive/raw/branch/main/append >> zip_folder_daily.sh
sh /opt/zip_folder_daily.sh
crontab -l > mycron
echo "0 13 * * * sh /opt/folderarchive/zip_folder_daily.sh" >> mycron
crontab mycron
rm mycron