I need a simple bash-script what does the following:
1) There is a path [TARGET] on the local file system defined as a variable at the beginning of the script.
2) It creates a directory (name = current date YYYY-MM-DD) within the [TARGET].
3) It downloads (curl) two (or more) files from different remote locations. The locations are https://... with basic htaccess auth and puts those files in [TARGET]/[CURDATE] . The complete URL, username and password can be hardcoded inside the script. Please write a function so I can add more locations on my own.
4) It establishes an open-vpn connection ([login to view URL], [login to view URL] files are in the same directory as the script is, username and password are given and can be hardcoded in the script)
5) It does the same as in 2) for another remote file which is only accessible over the vpn connection (https://192.168....)
6) It has to sync a remote directory which is also only accessible over the vpn connection (by FTP connection). The content of the directory is quite big (10GB) with few changes, the files should be stored in a tmp directory on the local machine. The sync is ONE WAY from the remote directory -> local directory. All the files deleted in the remote directory should be deleted in the local directory. Not other way around.
7) After the sync it should zip all the files inside the tmp directory from 6) and put the zipped file in the [TARGET]/[CURDATE]
8) disconnect from open vpn
9) If it is SATURDAY OR the 1. of the month it should download another remote file like in 2)
10) All directories older than 14 days created in [TARGET] should be deleted EXPECT of all directories created on the 1. of the month.
11) The script should send an email by SMTP (over TLS, receiver, server, username and password can be hardcored) with the following content: Every file in [TARGET]/[CURDATE] with its file size: [login to view URL] ... 2048KB ... [login to view URL] ....1024KB...
12) If it is the first of the month the directory created ([TARGET]/[CURDATE]) with all files in it should be uploaded to another target (by SFTP)
13) Thats it :-)
Unfourtunately I can not grant you access to the local server or to the remote file locations so you have to test the script on your machine. Please list all the dependencies / programs that I have to install on the local machine by apt-get. The local system is ubuntu 20 LTS. I am a software developer (with poor linux console skills) and can make some small modifications and adjust the script. I just need the complete working script (tested in your environment) ASAP and put in all the locations, usernames and so on.
PLEASE: Read the instructions carefully. All of the steps from 1) to 13) has to be done in this order. After the end of the script the openvpn connection must be terminated.
15 freelance font une offre moyenne de €132 pour ce travail
Hi, Please initiate a chat for further project discussion. I have 8 years plus experience in DevOps, SysOps, Cloud infrastructure deployement on both Linux and Windows, Ansible, Shell / Bash scripting , AWX scripting Plus
Hello, I'm expert in the same profession. I've more than 7+ years of experience. I can do this task easily on time. I'll create an amazing project. Also have a look over my profile in order to get to know about me more Plus
Hello, I have a great experience in developing shell scripts. - Yes, you will be able to edit the script yourself, there will be nothing complicated about it. It will be something like: download URL username password Plus
Hi, I have 20+ years experience in Linux system admin. I can do what you need. Feel free to discuss further detail in chat. Thank you.
Hey, I have read your requirements and this is something I had done recently for my code base to update a remote codebase when I make changes to my local code in an IDE. I think what you need is pretty similar and look Plus
Hi, Can I Start yours immediately? Thanks for sharing your project requirement with us. It will be our great pleasure to work on your project. I have checked your requirement, yes we can do it because we already work o Plus
I am a Linux admin have 7 years of experience in this field. I worked in webhosting industry and manage datacenter from remote. I give full server management support and I can do this for you . I also have experience w Plus
I CAN COMPLETE YOUR PROJECT EASILY Hello, I am programmer with enough experiences on C/C++ for 13 years. C/C++ is nice programming language and I am majoring on it for long years so I have confident to complete your pr Plus
Hello, I have experience in bash/shell script (Linux, CentOS, Ubuntu,...). I think your requirement is the same with my day work. I can do that for you, Thanks
Shell script writing is my profession, I could help you with a script which will perform all 13 steps in a flash.
Hi, If you're a dev why not implement it in nodejs or python on windows... and transfer the script to linux? maybe even as a docker image where the dest folder is mounted? Full time dev since 2004. frontend + backend Plus
I am expert in writing bash script ,I have already wrote almost same bash script as part of our project requirement, I can deliver you in 1 day
from what you said I got that you want to use two types of downloading one using VPN and the other without it. The one you want to use VPN with you also want to SYNACK the files in the server side using ftp and compres Plus