diff --git a/README.md b/README.md new file mode 100644 index 0000000..3c5f253 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# Authelia SSO Portal – Custom Theme + +Custom Login-Portal Styling fΓΌr die Authelia SSO Portale ([auth.free-warez.win](https://auth.free-warez.win), [auth.w-make.com](https://auth.w-make.com), [auth.free-warez.top](https://auth.free-warez.top)). + +--- + +## πŸ“ Struktur +- `custom/custom.css`: CSS-Variablen (`--ak-primary-color`, `--ak-background-color`, Flow-Hintergrund, zentriertes und abgerundetes Logo). +- `deploy.sh`: Synchronisiert das CSS auf beide VPS-Instanzen (`free-warez.win` und `free-warez.top`) und startet Authelia neu. + +## πŸš€ Deployment +```bash +./deploy.sh +``` diff --git a/custom/cyber_bg.jpg b/custom/cyber_bg.jpg new file mode 100644 index 0000000..4fea393 Binary files /dev/null and b/custom/cyber_bg.jpg differ diff --git a/custom/favicon.ico b/custom/favicon.ico new file mode 100644 index 0000000..b12c57e Binary files /dev/null and b/custom/favicon.ico differ diff --git a/custom/logo.png b/custom/logo.png new file mode 100644 index 0000000..3fb8869 Binary files /dev/null and b/custom/logo.png differ diff --git a/deploy.sh b/deploy.sh new file mode 100755 index 0000000..9d2c0dd --- /dev/null +++ b/deploy.sh @@ -0,0 +1,66 @@ +#!/usr/bin/env bash +# deploy.sh - Deploy Authelia Portal Theme, 3D Shield Logo & Favicon +# Hosts: free-warez.win & free-warez.top -> /opt/containers/authelia/ + +set -euo pipefail + +HOSTS=("free-warez.win" "free-warez.top") +TARGET_ASSET_DIR="/opt/containers/authelia/config/assets" +LOCAL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + +echo "πŸš€ Deploying Authelia Portal Theme & Assets" +echo "===============================================" + +for HOST in "${HOSTS[@]}"; do + echo "πŸ“‘ Connecting to $HOST..." + if ssh -q -o BatchMode=yes -o ConnectTimeout=5 "$HOST" exit; then + echo "πŸ“ Ensuring asset directory exists on $HOST..." + ssh "$HOST" "mkdir -p $TARGET_ASSET_DIR" + + echo "πŸ”„ Syncing 3D Cyber Shield Logo & Favicon to $HOST:$TARGET_ASSET_DIR..." + rsync -avz "$LOCAL_DIR/custom/logo.png" "$HOST:$TARGET_ASSET_DIR/logo.png" + rsync -avz "$LOCAL_DIR/custom/favicon.ico" "$HOST:$TARGET_ASSET_DIR/favicon.ico" + rsync -avz "$LOCAL_DIR/custom/cyber_bg.jpg" "$HOST:$TARGET_ASSET_DIR/cyber_bg.jpg" + + echo "βš™οΈ Ensuring theme: dark and server.asset_path are active on $HOST..." + ssh "$HOST" "python3 -c ' +path = \"/opt/containers/authelia/config/configuration.yml\" +with open(path) as f: + content = f.read() + +lines = content.splitlines(True) +new_lines = [] +has_theme = False +has_asset_path = False + +for line in lines: + if line.startswith(\"theme:\"): + new_lines.append(\"theme: dark\n\") + has_theme = True + elif \"asset_path:\" in line: + new_lines.append(\" asset_path: /config/assets/\n\") + has_asset_path = True + elif line.startswith(\"server:\"): + new_lines.append(line) + if not has_asset_path: + new_lines.append(\" asset_path: /config/assets/\n\") + has_asset_path = True + else: + new_lines.append(line) + +if not has_theme: + new_lines.insert(4, \"theme: dark\n\") + +with open(path, \"w\") as f: + f.writelines(new_lines) +'" + + echo "πŸ”„ Restarting Authelia container on $HOST..." + ssh "$HOST" "docker restart authelia" + echo "βœ… $HOST updated!" + else + echo "⚠️ Could not connect to $HOST, skipping." + fi +done + +echo "✨ Authelia Deployment finished!"