-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from hackffm/activate202309
Activate202309
- Loading branch information
Showing
4 changed files
with
58 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,48 @@ | ||
#!/bin/bash | ||
# all files should be in plac by dockerfile | ||
echo "check setup" | ||
if [ ! -d ~/actioncam ]; then | ||
echo "create actioncam folders" | ||
mkdir ~/actioncam | ||
mkdir ~/actioncam/data | ||
mkdir ~/actioncam/compressed | ||
mkdir ~/actioncam/log | ||
mkdir ~/actioncam/recordings | ||
mkdir ~/actioncam/send | ||
mkdir ~/actioncam | ||
mkdir ~/actioncam/data | ||
mkdir ~/actioncam/compressed | ||
mkdir ~/actioncam/log | ||
mkdir ~/actioncam/recordings | ||
mkdir ~/actioncam/send | ||
fi | ||
# | ||
cd ~/actioncam | ||
if [ ! -f ~/actioncam/config.json ]; then | ||
echo "copy config" | ||
cp config.json ~/actioncam | ||
echo "copy config" | ||
cp ./config.json ~/actioncam/ | ||
fi | ||
if [ -f ~/actioncam/config.json ]; then | ||
echo "found config.json and preparing for current user" | ||
sed -i -e 's/HOME/'"${HOME}"'/g' ~/actioncam/config.json | ||
echo "found config.json and preparing for current user" | ||
sed -i -e 's/piuser/'"${USERNAME}"'/g' ~/actioncam/config.json | ||
fi | ||
# | ||
if [ ! -f ~/actioncam/config.json ]; then | ||
echo "copy config" | ||
cp ./config.json ~/actioncam/ | ||
fi | ||
if [ ! -f ~/actioncam/requirements.txt ]; then | ||
echo "copy requierements.txt" | ||
cp ./requirements.txt ~/actioncam/ | ||
fi | ||
if [ ! -d ~/actioncam/venv ]; then | ||
mkdir ~/actioncam/venv | ||
echo "create python venv" | ||
python3 -m venv ~/actioncam/venv | ||
|
||
echo #install python packages" | ||
source ~/actioncam/venv/bin/activate | ||
cd ~/actioncam | ||
pip install --upgrade pip | ||
pip install -r requirements.txt | ||
pip install -r ~/actioncam/requirements.txt | ||
fi | ||
if [ ! -f ~/actioncam/code ]; then | ||
echo "copy code" | ||
cp -r ../../code ~/actioncam/ | ||
fi | ||
if [ ! -f ~/actioncam/start_actioncam.sh ]; then | ||
echo "copy start_actioncam.sh" | ||
cp ../startup/start_actioncam.sh ~/actioncam/ | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters