Download deploy-wsl.sh from metarm/QMetaRam: direct link, hf CLI and curl.
- Browser
- Download file 1.52 kB
-
https://huggingface.co/metarm/QMetaRam/resolve/main/deploy-wsl.sh
- Command line
-
hf download hf://metarm/QMetaRam/deploy-wsl.sh
-
curl -L -o deploy-wsl.sh https://huggingface.co/metarm/QMetaRam/resolve/main/deploy-wsl.sh
1.52 kB
| # ========================================================= | |
| # deploy-wsl.sh — QMetaram QHub Deploy Script (WSL) | |
| # Run from WSL: bash deploy-wsl.sh | |
| # ========================================================= | |
| set -e | |
| WINDOWS_PROJECT="/mnt/c/Users/KUNIGO/Downloads/qhub" | |
| DIST_SRC="${WINDOWS_PROJECT}/dist" | |
| NGINX_CONF_SRC="${WINDOWS_PROJECT}/nginx.qmetaram.conf" | |
| NGINX_SITES_AVAIL="/etc/nginx/sites-available/qmetaram" | |
| NGINX_SITES_ENABLED="/etc/nginx/sites-enabled/qmetaram" | |
| WEB_ROOT="/var/www/qhub/dist" | |
| echo "=== Step 1: Create web root ===" | |
| sudo mkdir -p "${WEB_ROOT}" | |
| echo "=== Step 2: Copy dist files ===" | |
| sudo cp -r "${DIST_SRC}/." "${WEB_ROOT}/" | |
| echo " Copied $(ls "${DIST_SRC}" | wc -l) items to ${WEB_ROOT}" | |
| echo "=== Step 3: Install nginx config ===" | |
| sudo cp "${NGINX_CONF_SRC}" "${NGINX_SITES_AVAIL}" | |
| # Enable site (remove old symlink if exists) | |
| sudo rm -f "${NGINX_SITES_ENABLED}" | |
| sudo ln -s "${NGINX_SITES_AVAIL}" "${NGINX_SITES_ENABLED}" | |
| # Disable default site if present | |
| sudo rm -f /etc/nginx/sites-enabled/default | |
| echo "=== Step 4: Install nginx (if missing) ===" | |
| if ! command -v nginx &>/dev/null; then | |
| sudo apt-get update -qq | |
| sudo apt-get install -y nginx | |
| fi | |
| echo "=== Step 5: Test nginx config ===" | |
| sudo nginx -t | |
| echo "=== Step 6: Reload nginx ===" | |
| if systemctl is-active --quiet nginx 2>/dev/null; then | |
| sudo systemctl reload nginx | |
| else | |
| sudo nginx | |
| fi | |
| echo "" | |
| echo "=== Done! Site is live at http://localhost ===" | |
| echo " Verify: curl -I http://localhost/" | |