2025-08-08 19:26:22 +08:00

26 lines
729 B
Bash
Executable File

#!/bin/bash
cd /root/xplayer-ota
git restore .
git pull
# Download and extract files before running ansible-playbook
if [ -f "files_download.txt" ]; then
echo "Downloading files from files_download.txt..."
while IFS= read -r url; do
if [ -n "$url" ]; then
filename=$(basename "$url")
echo "Downloading $filename..."
wget -O "$filename" "$url"
if [ $? -eq 0 ]; then
echo "Extracting $filename..."
tar -xJf "$filename"
rm -f "$filename"
else
echo "Failed to download $url"
fi
fi
done < files_download.txt
fi
ansible-playbook playbooks/site.yml -e force_update=true