diff --git a/site/fichiersRPI/fichiersRPI.zip b/site/fichiersRPI/fichiersRPI.zip deleted file mode 100644 index 5ac9dfa..0000000 Binary files a/site/fichiersRPI/fichiersRPI.zip and /dev/null differ diff --git a/site/fichiersRPI/python.sh b/site/fichiersRPI/python.sh new file mode 100755 index 0000000..909ce33 --- /dev/null +++ b/site/fichiersRPI/python.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +cd $1 +/usr/bin/python3 Rpi_to_server.py diff --git a/site/fichiersRPI/script.sh b/site/fichiersRPI/script.sh index 810f381..ac8669f 100755 --- a/site/fichiersRPI/script.sh +++ b/site/fichiersRPI/script.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash echo $$ > /var/run/script.pid @@ -12,8 +12,7 @@ sudo make sudo make upload sudo python3 Rpi_to_server.py -#while true -#do -# sleep 5 -# python3 Rpi_to_server.py -#done +pwd=$(pwd) +tps=1 +crontab -l | grep -v $pwd | crontab - +(crontab -l ; echo "*/$tps * * * * $pwd/python.sh $pwd") | crontab - diff --git a/site/fichiersRPI/stop.sh b/site/fichiersRPI/stop.sh new file mode 100755 index 0000000..dd0d5a1 --- /dev/null +++ b/site/fichiersRPI/stop.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +pwd=$(pwd) +crontab -l | grep -v $pwd | crontab - -- libgit2 0.21.2