add check

This commit is contained in:
2025-05-30 21:46:29 -05:00
parent 011468cf65
commit 31c904161e

View File

@@ -18,10 +18,16 @@ shelly-plug:
- -ec
- |
cd /var/www/html
if [ -d ".git" ]; then
echo "Git repository found. Pulling latest changes..."
git pull
else
echo "Not a git repository. Initializing ..."
git init
git remote add origin https://github.com/geerlingguy/shelly-plug-prometheus.git
git fetch origin
git checkout origin/master -ft
fi
resources:
requests:
cpu: 10m