mirror of
https://github.com/Ap0dexMe0/o11pro-unpacked.git
synced 2026-07-15 18:30:02 +02:00
released v1.3.5
This commit is contained in:
@@ -17,25 +17,6 @@ sudo sh -c "$(wget -O- https://raw.githubusercontent.com/Ap0dexMe0/o11pro-unpack
|
|||||||
sudo sh -c "$(fetch -o - https://raw.githubusercontent.com/Ap0dexMe0/o11pro-unpacked/main/install.sh)"
|
sudo sh -c "$(fetch -o - https://raw.githubusercontent.com/Ap0dexMe0/o11pro-unpacked/main/install.sh)"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Install options (via environment variables)
|
|
||||||
|
|
||||||
| Variable | Description | Default |
|
|
||||||
| --------------- | ----------------------------- | -------------- |
|
|
||||||
| `O11PRO_DIR` | Install directory | `/root/o11pro-unpacked` |
|
|
||||||
| `O11PRO_PORT` | Server port | `1337` |
|
|
||||||
| `O11PRO_VERBOSE`| Log level (0–5) | `2` |
|
|
||||||
| `O11PRO_USER` | Admin username | auto-generated |
|
|
||||||
| `O11PRO_PASS` | Admin password | auto-generated |
|
|
||||||
| `O11PRO_BRANCH` | Git branch to clone | `main` |
|
|
||||||
| `O11PRO_YES` | Skip confirm prompts | `0` |
|
|
||||||
|
|
||||||
Example with custom options:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
O11PRO_PORT=8080 O11PRO_YES=1 \
|
|
||||||
sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/Ap0dexMe0/o11pro-unpacked/main/install.sh)"
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Further Reading
|
## Further Reading
|
||||||
|
|||||||
+50
-25
@@ -38,22 +38,20 @@ for arg in "$@"; do
|
|||||||
done
|
done
|
||||||
[ "${O11PRO_YES:-0}" = "1" ] && FORCE=1
|
[ "${O11PRO_YES:-0}" = "1" ] && FORCE=1
|
||||||
|
|
||||||
# ─── Colors ──────────────────────────────────────────────────────────────
|
# ─── Symbols ─────────────────────────────────────────────────────────────
|
||||||
RST='\033[0m'
|
# Use Unicode symbols in bash/zsh, ASCII fallback in POSIX sh (dash).
|
||||||
BLD='\033[1m'
|
_ok='*'; _info='>'; _warn='!'; _fail='x'
|
||||||
DIM='\033[2m'
|
_test=$(printf '\xE2\x9C\x94' 2>/dev/null) || true
|
||||||
RED='\033[0;31m'
|
case "$_test" in *\\*) ;; *)
|
||||||
GRN='\033[0;32m'
|
_ok='\xE2\x9C\x94'; _info='\xE2\x96\xB6'; _warn='\xE2\x9A\xA0'; _fail='\xE2\x9C\x98'
|
||||||
YLW='\033[0;33m'
|
esac
|
||||||
BLU='\033[0;34m'
|
|
||||||
CYN='\033[0;36m'
|
|
||||||
|
|
||||||
ok() { printf " ${GRN}\xE2\x9C\x94${RST} ${BLD}%s${RST} %s\n" "$1" "${2-}"; }
|
ok() { printf " ${_ok} %s %s\n" "$1" "${2-}"; }
|
||||||
info() { printf " ${CYN}\xE2\x96\xB6${RST} ${DIM}%s${RST}\n" "$1"; }
|
info() { printf " ${_info} %s\n" "$1"; }
|
||||||
warn() { printf " ${YLW}\xE2\x9A\xA0${RST} ${BLD}%s${RST} %s\n" "$1" "${2-}"; }
|
warn() { printf " ${_warn} %s %s\n" "$1" "${2-}"; }
|
||||||
fail() { printf " ${RED}\xE2\x9C\x98${RST} ${RED}%s${RST}\n" "$1"; exit 1; }
|
fail() { printf " ${_fail} %s\n" "$1"; exit 1; }
|
||||||
sep() { printf " ${DIM}----------------------------------------${RST}\n"; }
|
sep() { printf " ----------------------------------------\n"; }
|
||||||
header(){ printf "\n ${BLD}%s${RST}\n ${DIM}%s${RST}\n\n" "$1" "${2-}"; }
|
header(){ printf "\n%s\n%s\n\n" "$1" "${2-}"; }
|
||||||
|
|
||||||
# ─── Check prerequisites ─────────────────────────────────────────────────
|
# ─── Check prerequisites ─────────────────────────────────────────────────
|
||||||
header "o11pro Installer" "One-command setup for o11pro-unpacked"
|
header "o11pro Installer" "One-command setup for o11pro-unpacked"
|
||||||
@@ -115,7 +113,7 @@ fi
|
|||||||
# ─── Install ─────────────────────────────────────────────────────────────
|
# ─── Install ─────────────────────────────────────────────────────────────
|
||||||
sep
|
sep
|
||||||
|
|
||||||
info "Installing to ${BLD}$INSTALL_DIR${RST}..."
|
info "Installing to $INSTALL_DIR..."
|
||||||
|
|
||||||
# Ensure parent directory exists
|
# Ensure parent directory exists
|
||||||
PARENT_DIR=$(dirname "$INSTALL_DIR")
|
PARENT_DIR=$(dirname "$INSTALL_DIR")
|
||||||
@@ -135,7 +133,7 @@ else
|
|||||||
rm -rf "$INSTALL_DIR"
|
rm -rf "$INSTALL_DIR"
|
||||||
git clone --depth 1 -b "$BRANCH" "$REPO_URL" "$INSTALL_DIR"
|
git clone --depth 1 -b "$BRANCH" "$REPO_URL" "$INSTALL_DIR"
|
||||||
fi
|
fi
|
||||||
ok "repository" "cloned to ${DIM}$INSTALL_DIR${RST}"
|
ok "repository" "cloned to $INSTALL_DIR"
|
||||||
|
|
||||||
cd "$INSTALL_DIR"
|
cd "$INSTALL_DIR"
|
||||||
|
|
||||||
@@ -163,7 +161,7 @@ done
|
|||||||
|
|
||||||
if [ -n "$BINARY" ]; then
|
if [ -n "$BINARY" ]; then
|
||||||
chmod +x "$BINARY"
|
chmod +x "$BINARY"
|
||||||
ok "binary" "ready (${DIM}$BINARY${RST})"
|
ok "binary" "ready ($BINARY)"
|
||||||
else
|
else
|
||||||
warn "binary" "not found in src/ — check your download"
|
warn "binary" "not found in src/ — check your download"
|
||||||
fi
|
fi
|
||||||
@@ -172,11 +170,29 @@ fi
|
|||||||
[ -f "src/RunMe.sh" ] && chmod +x "src/RunMe.sh"
|
[ -f "src/RunMe.sh" ] && chmod +x "src/RunMe.sh"
|
||||||
ok "launcher" "ready"
|
ok "launcher" "ready"
|
||||||
|
|
||||||
# ─── Check for FFmpeg ────────────────────────────────────────────────────
|
# ─── FFmpeg ──────────────────────────────────────────────────────────────
|
||||||
if has_cmd ffmpeg; then
|
if has_cmd ffmpeg; then
|
||||||
ok "ffmpeg" "$(ffmpeg -version 2>&1 | head -1 | sed 's/ffmpeg version //' | sed 's/ Copyright.*//')"
|
ok "ffmpeg" "$(ffmpeg -version 2>&1 | head -1 | sed 's/ffmpeg version //' | sed 's/ Copyright.*//')"
|
||||||
else
|
else
|
||||||
warn "ffmpeg not found" "install it for transcoding support"
|
info "ffmpeg not found — installing..."
|
||||||
|
if has_cmd apt-get; then
|
||||||
|
apt-get update -qq && apt-get install -y -qq ffmpeg
|
||||||
|
elif has_cmd yum; then
|
||||||
|
yum install -y ffmpeg 2>/dev/null || \
|
||||||
|
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm 2>/dev/null && \
|
||||||
|
yum install -y ffmpeg ffmpeg-devel
|
||||||
|
elif has_cmd apk; then
|
||||||
|
apk add ffmpeg
|
||||||
|
elif has_cmd zypper; then
|
||||||
|
zypper install -y ffmpeg
|
||||||
|
elif has_cmd pacman; then
|
||||||
|
pacman -S --noconfirm ffmpeg
|
||||||
|
else
|
||||||
|
warn "ffmpeg" "could not install automatically — install manually"
|
||||||
|
fi
|
||||||
|
if has_cmd ffmpeg; then
|
||||||
|
ok "ffmpeg" "$(ffmpeg -version 2>&1 | head -1 | sed 's/ffmpeg version //' | sed 's/ Copyright.*//')"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ─── Create runtime directories ──────────────────────────────────────────
|
# ─── Create runtime directories ──────────────────────────────────────────
|
||||||
@@ -196,12 +212,21 @@ mkdir -p "$INSTALL_DIR/providers"
|
|||||||
mkdir -p "$INSTALL_DIR/cache"
|
mkdir -p "$INSTALL_DIR/cache"
|
||||||
ok "directories" "created"
|
ok "directories" "created"
|
||||||
|
|
||||||
# ─── Done ────────────────────────────────────────────────────────────────
|
# ─── Done — launch ───────────────────────────────────────────────────────
|
||||||
sep
|
sep
|
||||||
echo
|
echo
|
||||||
printf " ${GRN}\xE2\x9C\x94${RST} ${BLD}o11pro installed successfully${RST}\n"
|
printf " ${_ok} o11pro installed successfully\n"
|
||||||
|
echo
|
||||||
|
printf " Starting o11pro...\n"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
printf " ${DIM}Launch:${RST}\n"
|
# Verify that the launcher exists and is executable
|
||||||
printf " cd ${INSTALL_DIR}/src && ./RunMe.sh ${O11PRO_PORT:-1337} ${O11PRO_VERBOSE:-2}\n"
|
if [ ! -f "$INSTALL_DIR/src/RunMe.sh" ]; then
|
||||||
echo
|
fail "RunMe.sh not found in src/ — cannot start."
|
||||||
|
fi
|
||||||
|
if [ ! -x "$INSTALL_DIR/src/RunMe.sh" ]; then
|
||||||
|
chmod +x "$INSTALL_DIR/src/RunMe.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$INSTALL_DIR/src"
|
||||||
|
exec ./RunMe.sh
|
||||||
Reference in New Issue
Block a user