Skip to content

usr local bin

Q-engineering edited this page Aug 20, 2023 · 3 revisions

/usr/local/bin

output image

The programs found at /usr/local/bin

Program GPIO email Description
Alive ✔️ ✔️ The software watchdog.
gdrive ✔️ Google Drive command line tool.
gpio ✔️ WiringPi software.
Google.sh ✔️ Script for uploading and removing recordings.
MkRecDir.sh ✔️ Makes the recordings folder.
opencv_ ✔️ ✔️ OpenCV executables (don't remove).
setup_vars_opencv4.sh ✔️ ✔️ OpenCV script (don't remove).
StartCam.sh ✔️ ✔️ Start script, see auto start.
YoloCamRpi ✔️ ✔️ The YoloCam application.

Google.sh

#!/bin/sh

# wait 3 Sec to stop the recorder
sleep 3
# copy the file
gdrive files upload $1
# see if we need to delete the original
if [ $2 -eq 1 ]; then
    rm $1
fi

MkRecDir.sh

#!/bin/sh
if [ ! -e $1 ]; then
    sudo mkdir -p $1
    sudo chown -R www-data:www-data $1
    sudo chmod -R a+rwx $1
fi

StartCam.sh

#!/bin/sh
sleep 10
YoloCamRpi

Of course, all three scripts need to be executable.

sudo chmod 755 /usr/local/bin/Google.sh
sudo chmod 755 /usr/local/bin/MkRecDir.sh
sudo chmod 755 /usr/local/bin/StartCam.sh
Clone this wiki locally