Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Scripting System 

: Set Up Documentation

Introduction :
This program is an archival program. It requests a zip file on a web server. Then unzip file, check it
and then upload it on smb server. Program removes automatically expired files.

1 –Download project :

After downloading the project, check your version of python, python 3 is required for the proper
functioning of the program. You can download python 3 here:. https://www.python.org/downloads.

You must then download all the libraries necessary for the correct functioning of the program. To do
this, launch:.

Finally we need to generate the crontab which will automate the launch of the program every day.

Create CRON manually

- Create default cron file (be careful: do not use sudo, or you will create cron for root): “crontab -e”

- Edit this one by writing without quotes: “0 23 * * * cd ; python3 main.py”

- Verification crontab is created: “crontab -l” returns you what you wrote in file

2 –Set Up SMB server :


Follow this guide to set up smb server on your machine :

https://www.dell.com/support/kbdoc/fr-fr/000175311/configuration-de-votre-ordinateur-ou-de-
votre-serveur-pour-la-num%C3%A9risation-smb-server-message-block-sur-les-imprimantes-laser-
dell-en-anglais
3 –Configuration :
Now we can configure program. Edit configuration file: “config.json” :

In this file, you will can configure program that will run.

If you accidently erase this file, you can regenerate buy running “gen_config.sh” file.

zip String Name of zip to get on web server (ex: “my_zip”).

file String Name of dump file to get on web server contained in zip file and archived in SMB Server
(ex: “my_dump_file”).

time-to-save String Time in days to store zip files on SMB server (ex: “2”). Default is 5.

smb : Set of data to configure access to SMB server.

Provide : your ip adress, user and password of the client, client name: for exemple PC name, and
the name of the sharefolder on your PC (sharefoldername)

email : Set of data to configure e-mails.

Provide : auth information : your email username and password, caracteristics of your email
server : ip and port. And the dest of your daily report.

3 –Launch Programm :
Run the main.py file with the command « python main.py »

You might also like