3 changed files with 0 additions and 91 deletions
@ -1,41 +0,0 @@ |
|||
#ofxPiMapper Scripts |
|||
|
|||
This directory contains useful scripts to be used to autorun and keep alive your projection mapping application. |
|||
|
|||
|
|||
## keepalive-example.sh |
|||
|
|||
This script launches and keeps alive the example application. |
|||
|
|||
1. Copy it to your home directory. |
|||
``` |
|||
cp keepalive-example.sh ~/keepalive-example.sh |
|||
``` |
|||
2. Set exec permissions. |
|||
``` |
|||
chmod a+x keepalive-example.sh |
|||
``` |
|||
3. Run `crontab -e` and add the following lines to make use of it. |
|||
``` |
|||
@reboot /home/pi/keepalive-example.sh |
|||
* * * * * /home/pi/keepalive-example.sh |
|||
``` |
|||
|
|||
|
|||
## keepalive-example-camera.sh |
|||
|
|||
This script launches and keeps alive the example-camera application. |
|||
|
|||
1. Copy it to your home directory. |
|||
``` |
|||
cp keepalive-example-camera.sh ~/keepalive-example-camera.sh |
|||
``` |
|||
2. Set exec permissions. |
|||
``` |
|||
chmod a+x keepalive-example-camera.sh |
|||
``` |
|||
3. Run `crontab -e` and add the following lines to make use of it. |
|||
``` |
|||
@reboot /home/pi/keepalive-example-camera.sh |
|||
* * * * * /home/pi/keepalive-example-camera.sh |
|||
``` |
@ -1,25 +0,0 @@ |
|||
#!/bin/bash |
|||
|
|||
PROCESS_DIR="/home/pi/openFrameworks/addons/ofxPiMapper/example/bin" |
|||
PROCESS_NAME="example-camera" |
|||
|
|||
case "$(pidof $PROCESS_NAME | wc -w)" in |
|||
|
|||
0) echo "Restarting $PROCESS_NAME: $(date)" >> "/var/log/$PROCESS_NAME.txt" |
|||
|
|||
for i in {5..1}; |
|||
do |
|||
echo -en "\rLaunching ofxPiMapper in $i" |
|||
sleep 1; |
|||
done |
|||
|
|||
echo -e "\r" |
|||
|
|||
"$PROCESS_DIR/$PROCESS_NAME" & |
|||
;; |
|||
1) # all ok |
|||
;; |
|||
*) echo "Removed double $PROCESS_NAME: $(date)" >> "/var/log/$PROCESS_NAME.txt" |
|||
kill $(pidof $PROCESS_NAME | awk '{print $1}') |
|||
;; |
|||
esac |
@ -1,25 +0,0 @@ |
|||
#!/bin/bash |
|||
|
|||
PROCESS_DIR="/home/pi/openFrameworks/addons/ofxPiMapper/example/bin" |
|||
PROCESS_NAME="example" |
|||
|
|||
case "$(pidof $PROCESS_NAME | wc -w)" in |
|||
|
|||
0) echo "Restarting $PROCESS_NAME: $(date)" >> "/var/log/$PROCESS_NAME.txt" |
|||
|
|||
for i in {5..1}; |
|||
do |
|||
echo -en "\rLaunching ofxPiMapper in $i" |
|||
sleep 1; |
|||
done |
|||
|
|||
echo -e "\r" |
|||
|
|||
"$PROCESS_DIR/$PROCESS_NAME" & |
|||
;; |
|||
1) # all ok |
|||
;; |
|||
*) echo "Removed double $PROCESS_NAME: $(date)" >> "/var/log/$PROCESS_NAME.txt" |
|||
kill $(pidof $PROCESS_NAME | awk '{print $1}') |
|||
;; |
|||
esac |
Loading…
Reference in new issue