- Server side: 3 files
- config.csv - The configuration file which stores the version from Server side.
- Toy_setting.csv - The setting file which will be set as parameter updating for mailfile.
- Toy.py - The main file in which we want to run and updates.
- Client side: 1 file
- Update.py
On server side Terminal we change to the desired directory then initiate Server :
cd /desktop/
python -m SimpleHTTPServer 8000
On client side Terminal:
cd home/ubuntu/CL_update
python Update.py
- Set up connection from client to server via http.
- Download and start the running background program__mainfile__ .
- Download setting file setting for mainfile .
- Update mainfile & setting if the version is higher in Server/
config.csv
andconfig.csv
&file
's version matches.
- Note that in mainfile commands MUST NOT EXECUTE in IMPORTING; i.e. set
if __name__ == '__main__'
on the execution scripts. ( In thecheck_output_cmd
we import version from mainfile ) - Version setting is controled by
StrictVersion
soshould be set carefully in furthur __mainfile__setting
MAC = '10.137.99.226' - mac address
PORT = '8000' - port setting
configuration = 'config.csv'
mainfile = 'Toy.py'
setting = 'Toy_setting.csv'