-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathlaunch.sh
43 lines (32 loc) · 891 Bytes
/
launch.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
BASEDIR=$(pwd)
DEVICE="jetsontx2"
#OPTIONS: 'raspi3','jetsonano','streampi','jetsontx2', 'xavier'
#In principle, the device streampi can be anything,
#but, a pi zero is most commonly used.
function setupdirs {
if [ ! -d "$BASEDIR/h264_videos/" ]
then
mkdir h264_videos
echo 'Setting up h264 directory'
fi
if [ ! -d "$BASEDIR/mp4_videos/" ]
then
mkdir mp4_videos
echo 'Setting up MP4 directory'
fi
}
if [ "$DEVICE" == "streampi" ]; then
cd common/
python3 stream_video.py
elif [ "$DEVICE" == "raspi3" ]; then
setupdirs;
nohup python3 -u raspi3/securitycam.py &> logs/camlog$(ls -l ./logs|wc -l).txt &
elif [ "$DEVICE" == "jetsonano" ]; then
setupdirs;
python3 jetsonano/securitycamnano.py
elif [ "$DEVICE" == "jetsontx2" ]; then
python3 jetsontx2/tx2_surveillance.py
elif [ "$DEVICE" == "xavier" ]; then
python3 xavier/xavier_surveillance.py
fi