Updated script, removed docker settings

This commit is contained in:
AzureAD\AniketSaha 2025-07-08 16:30:28 +02:00
parent 86c812178e
commit 31f044fab7

View File

@ -1,19 +1,12 @@
#!/bin/bash
set -e
echo "[UPDATE] Pulling latest changes (on host)..."
echo "[UPDATE] Pulling latest code..."
cd /home/hmi/Desktop/HMI || exit 1
git pull origin main || exit 1
git reset --hard HEAD
git pull origin main
echo "[UPDATE] Rebuilding Docker image..."
docker build -t hmi-app . || exit 1
echo "[RESTART] Restarting HMI service..."
sudo /bin/systemctl restart hmi.service
echo "[UPDATE] Restarting container..."
docker stop hmi && docker rm hmi
docker run -d --name hmi \
--network host \
--privileged \
--restart unless-stopped \
-v /home/hmi/Desktop/HMI:/app \
hmi-app || exit 1
echo "[UPDATE] Complete"
echo "[DONE] HMI updated."