From a05a943af23f3ff46dcd4e71698e02369311204c Mon Sep 17 00:00:00 2001 From: Helva Date: Fri, 30 Jan 2026 23:53:32 +0100 Subject: [PATCH] readme code blocks --- README.md | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 2145ad2..b8b9fd1 100644 --- a/README.md +++ b/README.md @@ -3,53 +3,53 @@ We build a robot with raspberry and arduino. ## Checkout Repo -cd /opt -git checkout https://git.dyn.mcf.at/Max/helva-robot.git + cd /opt + git checkout https://git.dyn.mcf.at/Max/helva-robot.git ## Raspberry Face ### Install Packages -sudo apt update -sudo apt install -y nginx python3 python3-venv + sudo apt update + sudo apt install -y nginx python3 python3-venv -sudo mkdir -p /opt/face -sudo chown -R $USER:$USER /opt/face + sudo mkdir -p /opt/face + sudo chown -R $USER:$USER /opt/face -python3 -m venv /opt/face/venv -/opt/face/venv/bin/pip install --upgrade pip -/opt/face/venv/bin/pip install fastapi uvicorn + python3 -m venv /opt/face/venv + /opt/face/venv/bin/pip install --upgrade pip + /opt/face/venv/bin/pip install fastapi uvicorn ### Exchange Nginx Web-Folder -sudo rm -r /var/www/html -sudo ln -s /opt/helva-robot/face/var/www/html/ /var/www/ + sudo rm -r /var/www/html + sudo ln -s /opt/helva-robot/face/var/www/html/ /var/www/ ### Permissions of Webfolder -sudo chown -R www-data:www-data /var/www/html + sudo chown -R www-data:www-data /var/www/html ### Nginx Vhost -sudo ln -s /opt/helva-robot/face/etc/nginx/sites-available/face /etc/nginx/sites-enabled/ + sudo ln -s /opt/helva-robot/face/etc/nginx/sites-available/face /etc/nginx/sites-enabled/ ### Restart nginx -sudo systemctl restart nginx + sudo systemctl restart nginx ### Test Face Server In Browser: http:/// From Somewhere: -curl -X POST http:///api/emotion/happy -curl -X POST http:///api/emotion/angry -curl -X POST http:///api/emotion/sleepy + curl -X POST http:///api/emotion/happy + curl -X POST http:///api/emotion/angry + curl -X POST http:///api/emotion/sleepy ### systemd Service -sudo ln -s /opt/helva-robot/face/etc/systemd/system/face.service /etc/systemd/system/ + sudo ln -s /opt/helva-robot/face/etc/systemd/system/face.service /etc/systemd/system/ -sudo chown -R www-data:www-data /opt/face -sudo chmod -R 755 /opt/face + sudo chown -R www-data:www-data /opt/face + sudo chmod -R 755 /opt/face Start: -sudo systemctl daemon-reload -sudo systemctl enable --now face.service -sudo systemctl status face.service --no-pager + sudo systemctl daemon-reload + sudo systemctl enable --now face.service + sudo systemctl status face.service --no-pager