Addded Removing old Files shortened Links
This commit is contained in:
@@ -14,8 +14,8 @@ For installation download and run setup.sh. This will install the nesecary depen
|
|||||||
It will also create a SystemD service to automaticly start the program when the Pi is booted.
|
It will also create a SystemD service to automaticly start the program when the Pi is booted.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
wget -L "https://raw.githubusercontent.com/miT-nib-hcI/PiVideo/main/setup.sh"
|
wget -L "https://raw.githubusercontent.com/miT-nib-hcI/PiVideo/main/setup.sh" &&
|
||||||
chmod 755 setup.sh
|
chmod 755 setup.sh &&
|
||||||
./setup.sh
|
./setup.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -48,20 +48,55 @@ echo -e "${GREEN}======== Holle Datein ========${NOCOLOR}"
|
|||||||
mkdir ~/PiVideo/ ~/PiVideo/videos/
|
mkdir ~/PiVideo/ ~/PiVideo/videos/
|
||||||
cd ~/PiVideo/
|
cd ~/PiVideo/
|
||||||
|
|
||||||
wget -L "https://raw.githubusercontent.com/miT-nib-hcI/PiVideo/main/video.py"
|
GH_URL="https://raw.githubusercontent.com/miT-nib-hcI/PiVideo/main/"
|
||||||
|
|
||||||
|
if [ -f "~/PiVideo/video.py" ] # Checking if file exsists
|
||||||
|
then
|
||||||
|
echo "Script exists, updateing ..."
|
||||||
|
rm ~/PiVideo/video.py # Removing Old File
|
||||||
|
|
||||||
|
wget -L $GH_URL"video.py"
|
||||||
|
|
||||||
|
rm ~/PiVideo/*.sh # Removing Old Files
|
||||||
|
wget -L $GH_URL"start.sh"
|
||||||
|
wget -L $GH_URL"stop.sh"
|
||||||
|
wget -L $GH_URL"reload"
|
||||||
|
else
|
||||||
|
wget -L $GH_URL"video.py"
|
||||||
|
wget -L $GH_URL"start.sh"
|
||||||
|
wget -L $GH_URL"stop.sh"
|
||||||
|
wget -L $GH_URL"reload"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
wget -L "https://raw.githubusercontent.com/miT-nib-hcI/PiVideo/main/start.sh"
|
|
||||||
wget -L "https://raw.githubusercontent.com/miT-nib-hcI/PiVideo/main/stop.sh"
|
|
||||||
wget -L "https://raw.githubusercontent.com/miT-nib-hcI/PiVideo/main/reload.sh"
|
|
||||||
|
|
||||||
chmod 755 *.sh
|
chmod 755 *.sh
|
||||||
|
|
||||||
echo -e "${GREEN}======== Holle Videos========${NOCOLOR}"
|
echo -e "${GREEN}======== Holle Videos========${NOCOLOR}"
|
||||||
|
|
||||||
cd videos/
|
cd videos/
|
||||||
wget -L "https://raw.githubusercontent.com/miT-nib-hcI/PiVideo/main/videos/loop.mp4"
|
|
||||||
wget -L "https://raw.githubusercontent.com/miT-nib-hcI/PiVideo/main/videos/trigger.mp4"
|
|
||||||
|
|
||||||
|
if ls ~/PiVideo/videos/loop* 1> /dev/null 2>&1; # Checking if file exsists
|
||||||
|
then
|
||||||
|
echo "Video exists, updateing ..."
|
||||||
|
rm ~/PiVideo/videos/loop* # Removing Old Files
|
||||||
|
|
||||||
|
wget -L $GH_URL"videos/loop.mp4"
|
||||||
|
else
|
||||||
|
wget -L $GH_URL"videos/loop.mp4"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if ls ~/PiVideo/videos/loop* 1> /dev/null 2>&1; # Checking if file exsists
|
||||||
|
then
|
||||||
|
echo "Video exists, updateing ..."
|
||||||
|
rm ~/PiVideo/videos/trigger* # Removing Old Files
|
||||||
|
|
||||||
|
wget -L $GH_URL"videos/trigger.webm"
|
||||||
|
else
|
||||||
|
wget -L $GH_URL"videos/trigger.webm"
|
||||||
|
fi
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
echo -e "${GREEN}======== Erestele Systemd Service ========${NOCOLOR}"
|
echo -e "${GREEN}======== Erestele Systemd Service ========${NOCOLOR}"
|
||||||
|
|||||||
Reference in New Issue
Block a user