Actualiser run.sh
This commit is contained in:
17
run.sh
17
run.sh
@@ -1,21 +1,18 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
set -e
|
BASE="https://git.thomasmlg.fr/thomas/Docker/raw/branch/release"
|
||||||
|
|
||||||
DIR="/opt/lxc-updater"
|
DIR="/opt/lxc-updater"
|
||||||
|
|
||||||
mkdir -p "$DIR"
|
mkdir -p "$DIR"
|
||||||
|
|
||||||
cd "$DIR"
|
cd "$DIR"
|
||||||
|
|
||||||
echo "Downloading latest scripts..."
|
curl -fsSL "$BASE/detect.sh" -o detect.sh
|
||||||
|
curl -fsSL "$BASE/update.sh" -o update.sh
|
||||||
curl -fsSL https://git.thomasmlg.fr/thomas/Docker/raw/branch/main/updater/detect.sh -o detect.sh
|
|
||||||
curl -fsSL https://git.thomasmlg.fr/thomas/Docker/raw/branch/main/updater/update.sh -o update.sh
|
|
||||||
curl -fsSL https://git.thomasmlg.fr/thomas/Docker/raw/branch/main/updater/services.conf -o services.conf
|
|
||||||
|
|
||||||
chmod +x detect.sh update.sh
|
chmod +x detect.sh update.sh
|
||||||
|
|
||||||
METHOD=$(bash detect.sh)
|
METHOD="$(./detect.sh)"
|
||||||
|
echo "[run] method=$METHOD"
|
||||||
|
|
||||||
bash update.sh "$METHOD"
|
./update.sh "$METHOD"
|
||||||
Reference in New Issue
Block a user