I have a python script which exposes a RESTful service (using flask framework). What I would like to do with this service is that it clones the newest version of the python script, and then it starts main.py.
It is clear to me that it might be started at init level 3, how ever I am not sure how exactly the init info has to be configured and also I am not sure if it's okay to update the crontab with
sudo update-rc.d myservice enable 3
what's really in myservice script is something like:
#!/bin/sh
rm -fR /home/pi/myservicedir
git clone https://repo/code.git /home/pi/myservicedir
cd /home/pi/myservicedir
python main.py
Recent Questions...
ما را در سایت Recent Questions دنبال میکنید
برچسب:
نویسنده: استخدام کار
بازدید: 179
تاريخ: شنبه
22 خرداد
1395 ساعت: 17:55