poprawki
This commit is contained in:
@@ -13,8 +13,8 @@ Base URL: **https://gitea.linuxiarz.pl/gru/npm-angie-auto-install**
|
||||
---
|
||||
|
||||
## Requirements
|
||||
- Debian 13 (root privileges).
|
||||
- `curl`, `python3`, `systemd`.
|
||||
- Debian 13 / Ubuntu 24.04 (root privileges).
|
||||
- `curl`, `python3`
|
||||
- Network access to fetch packages and Node/Yarn artifacts.
|
||||
- ~2 GB RAM (recommended) or add 2 GB swap for safer frontend builds.
|
||||
|
||||
|
||||
1323
install.py
1323
install.py
File diff suppressed because it is too large
Load Diff
@@ -188,7 +188,7 @@ def comment_x_served_by_step(path="/etc/angie/conf.d/include/proxy.conf"):
|
||||
Path(tmp).write_text(out)
|
||||
shutil.copymode(p, tmp)
|
||||
os.replace(tmp, p)
|
||||
print(f"✔ Commented {count} line(s) | backup: {backup}")
|
||||
print(f"✔ Hide X-Server-by header | backup: {backup}")
|
||||
return count
|
||||
|
||||
|
||||
@@ -240,7 +240,7 @@ def setup_certbot_venv(venv_dir: Path = Path("/opt/certbot")):
|
||||
# --- Debian pyenv
|
||||
PYENV_ROOT = Path("/opt/npm/.pyenv")
|
||||
PYENV_OWNER = "npm"
|
||||
PYTHON_VERSION = "3.11.11"
|
||||
PYTHON_VERSION = "3.11.X"
|
||||
PYENV_BIN_CANDIDATES = ["pyenv", "/usr/bin/pyenv", "/usr/lib/pyenv/bin/pyenv"]
|
||||
|
||||
# --- Ubuntu: PPA deadsnakes + venv ---
|
||||
@@ -359,7 +359,7 @@ fi
|
||||
pip_path = venv_bin / "pip"
|
||||
certbot_path = venv_bin / "certbot"
|
||||
|
||||
with step(f"Preparing Certbot venv at {venv_dir} (Python {PYTHON_VERSION})"):
|
||||
with step(f"✔ Preparing Certbot venv at {venv_dir} (Python {PYTHON_VERSION})"):
|
||||
venv_dir.mkdir(parents=True, exist_ok=True)
|
||||
if not venv_dir.exists() or not pip_path.exists():
|
||||
run([str(python311), "-m", "venv", str(venv_dir)])
|
||||
@@ -379,7 +379,7 @@ fi
|
||||
|
||||
cb_ver = run_out([str(certbot_path), "--version"], check=False) or ""
|
||||
pip_ver = run_out([str(pip_path), "--version"], check=False) or ""
|
||||
print(f"Certbot: {cb_ver.strip()} | Pip: {pip_ver.strip()}")
|
||||
#print(f"Certbot: {cb_ver.strip()} | Pip: {pip_ver.strip()}")
|
||||
|
||||
run(["chown", "-R", f"{PYENV_OWNER}:{PYENV_OWNER}", str(PYENV_ROOT)], check=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user