mirror of
https://github.com/Snowy-Fluffy/zapret.installer.git
synced 2025-12-28 01:11:26 +03:00
31 lines
652 B
Bash
Executable File
31 lines
652 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
if [[ $EUID -ne 0 ]]; then
|
|
exec sudo "$0" "$@"
|
|
fi
|
|
|
|
|
|
|
|
REPO_DIR="/tmp/zapret.installer"
|
|
|
|
|
|
if [ ! -d "$REPO_DIR" ]; then
|
|
cd /tmp || exit
|
|
git clone https://github.com/Snowy-Fluffy/zapret.installer.git
|
|
else
|
|
cd "$REPO_DIR" || exit
|
|
if ! git pull; then
|
|
echo "Ошибка при обновлении. Удаляю репозиторий и клонирую заново..."
|
|
cd /tmp || exit
|
|
rm -rf "$REPO_DIR"
|
|
git clone https://github.com/Snowy-Fluffy/zapret.installer.git
|
|
cd "$REPO_DIR" || exit
|
|
fi
|
|
fi
|
|
cd $REPO_DIR || exit
|
|
chmod +x zapret-control.sh
|
|
bash zapret-control.sh
|
|
|