update_readme
This commit is contained in:
+9
-9
@@ -12,7 +12,7 @@ The installer is split into two layers:
|
||||
Run as root or through `sudo`:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.linuxiarz.pl/gru/pyTorrent/raw/branch/master/scripts/install_stack.sh | sudo bash
|
||||
curl -fsSL https://raw.githubusercontent.com/zdzichu6969/pyTorrent/master/scripts/install_stack.sh | sudo bash
|
||||
```
|
||||
|
||||
The bootstrap script downloads the current pyTorrent repository, detects the operating system family, and runs the matching installer:
|
||||
@@ -46,14 +46,14 @@ Environment variables must be passed to the `sudo bash` process.
|
||||
Example:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.linuxiarz.pl/gru/pyTorrent/raw/branch/master/scripts/install_stack.sh \
|
||||
curl -fsSL https://raw.githubusercontent.com/zdzichu6969/pyTorrent/master/scripts/install_stack.sh \
|
||||
| sudo PYTORRENT_PORT=8091 RTORRENT_SCGI_PORT=5001 bash
|
||||
```
|
||||
|
||||
Another example with a custom profile name:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.linuxiarz.pl/gru/pyTorrent/raw/branch/master/scripts/install_stack.sh \
|
||||
curl -fsSL https://raw.githubusercontent.com/zdzichu6969/pyTorrent/master/scripts/install_stack.sh \
|
||||
| sudo PYTORRENT_PROFILE_NAME="Local rTorrent" PYTORRENT_PORT=8090 bash
|
||||
```
|
||||
|
||||
@@ -63,7 +63,7 @@ These variables are used by `scripts/install_stack.sh`.
|
||||
|
||||
| Variable | Default | Description |
|
||||
| --- | --- | --- |
|
||||
| `PYTORRENT_REPO_URL` | `https://git.linuxiarz.pl/gru/pyTorrent` | Git repository base URL. |
|
||||
| `PYTORRENT_REPO_URL` | `https://github.com/zdzichu6969/pyTorrent` | GitHub repository base URL. |
|
||||
| `PYTORRENT_REPO_BRANCH` | `master` | Branch used to download the repository archive. |
|
||||
| `PYTORRENT_ARCHIVE_URL` | derived from repo URL and branch | Custom repository archive URL. |
|
||||
| `PYTORRENT_BOOTSTRAP_DIR` | `/tmp/pytorrent-stack-installer` | Temporary directory used by the bootstrap script. |
|
||||
@@ -72,7 +72,7 @@ These variables are used by `scripts/install_stack.sh`.
|
||||
Example using a different branch:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.linuxiarz.pl/gru/pyTorrent/raw/branch/master/scripts/install_stack.sh \
|
||||
curl -fsSL https://raw.githubusercontent.com/zdzichu6969/pyTorrent/master/scripts/install_stack.sh \
|
||||
| sudo PYTORRENT_REPO_BRANCH=develop bash
|
||||
```
|
||||
|
||||
@@ -96,14 +96,14 @@ These variables are used by both stack installers.
|
||||
Example:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.linuxiarz.pl/gru/pyTorrent/raw/branch/master/scripts/install_stack.sh \
|
||||
curl -fsSL https://raw.githubusercontent.com/zdzichu6969/pyTorrent/master/scripts/install_stack.sh \
|
||||
| sudo RTORRENT_USER=rtorrent RTORRENT_SCGI_PORT=5001 RTORRENT_TORRENT_PORT=51400 bash
|
||||
```
|
||||
|
||||
Classic xmlrpc-c backend instead of default tinyxml2. On Arch this forces source build:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.linuxiarz.pl/gru/pyTorrent/raw/branch/master/scripts/install_stack.sh \
|
||||
curl -fsSL https://raw.githubusercontent.com/zdzichu6969/pyTorrent/master/scripts/install_stack.sh \
|
||||
| sudo RTORRENT_WITH_XMLRPC_C=1 bash
|
||||
```
|
||||
|
||||
@@ -122,7 +122,7 @@ curl -fsSL https://git.linuxiarz.pl/gru/pyTorrent/raw/branch/master/scripts/inst
|
||||
Example with API token:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.linuxiarz.pl/gru/pyTorrent/raw/branch/master/scripts/install_stack.sh \
|
||||
curl -fsSL https://raw.githubusercontent.com/zdzichu6969/pyTorrent/master/scripts/install_stack.sh \
|
||||
| sudo PYTORRENT_API_TOKEN="pt_xxx" bash
|
||||
```
|
||||
|
||||
@@ -234,7 +234,7 @@ sudo bash scripts/install_pytorrent_only.sh
|
||||
Bootstrap run from repository:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.linuxiarz.pl/gru/pyTorrent/raw/branch/master/scripts/install_pytorrent.sh | sudo bash
|
||||
curl -fsSL https://raw.githubusercontent.com/zdzichu6969/pyTorrent/master/scripts/install_pytorrent.sh | sudo bash
|
||||
```
|
||||
|
||||
Non-interactive example for an existing TCP SCGI backend:
|
||||
|
||||
@@ -3,11 +3,11 @@ set -euo pipefail
|
||||
|
||||
# Bootstrap installer for pyTorrent only.
|
||||
# Intended usage:
|
||||
# curl -fsSL https://git.linuxiarz.pl/gru/pyTorrent/raw/branch/master/scripts/install_pytorrent.sh | sudo bash
|
||||
# curl -fsSL https://raw.githubusercontent.com/zdzichu6969/pyTorrent/master/scripts/install_pytorrent.sh | sudo bash
|
||||
|
||||
if [[ "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then
|
||||
cat <<'USAGE'
|
||||
Usage: curl -fsSL https://git.linuxiarz.pl/gru/pyTorrent/raw/branch/master/scripts/install_pytorrent.sh | sudo bash -s -- [options]
|
||||
Usage: curl -fsSL https://raw.githubusercontent.com/zdzichu6969/pyTorrent/master/scripts/install_pytorrent.sh | sudo bash -s -- [options]
|
||||
|
||||
This bootstrap downloads pyTorrent and forwards all options to scripts/install_pytorrent_only.sh.
|
||||
Run scripts/install_pytorrent_only.sh --help inside the repository for the full option list.
|
||||
@@ -20,11 +20,23 @@ if [[ "${EUID}" -ne 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
REPO_URL="${PYTORRENT_REPO_URL:-https://git.linuxiarz.pl/gru/pyTorrent}"
|
||||
REPO_URL="${PYTORRENT_REPO_URL:-https://github.com/zdzichu6969/pyTorrent}"
|
||||
REPO_BRANCH="${PYTORRENT_REPO_BRANCH:-master}"
|
||||
WORK_DIR="${PYTORRENT_BOOTSTRAP_DIR:-/tmp/pytorrent-only-installer}"
|
||||
KEEP_WORK_DIR="${PYTORRENT_KEEP_BOOTSTRAP_DIR:-0}"
|
||||
ARCHIVE_URL="${PYTORRENT_ARCHIVE_URL:-${REPO_URL%/}/archive/${REPO_BRANCH}.tar.gz}"
|
||||
|
||||
default_archive_url() {
|
||||
case "${REPO_URL%/}" in
|
||||
https://github.com/*)
|
||||
printf '%s/archive/refs/heads/%s.tar.gz\n' "${REPO_URL%/}" "${REPO_BRANCH}"
|
||||
;;
|
||||
*)
|
||||
printf '%s/archive/%s.tar.gz\n' "${REPO_URL%/}" "${REPO_BRANCH}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
ARCHIVE_URL="${PYTORRENT_ARCHIVE_URL:-$(default_archive_url)}"
|
||||
PROJECT_DIR="${WORK_DIR}/src"
|
||||
ARCHIVE_PATH="${WORK_DIR}/pytorrent.tar.gz"
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ set -euo pipefail
|
||||
|
||||
# Bootstrap installer for pyTorrent + rTorrent.
|
||||
# Intended usage from a clean server:
|
||||
# curl -fsSL https://git.linuxiarz.pl/gru/pyTorrent/raw/branch/master/scripts/install_stack.sh | sudo bash
|
||||
# curl -fsSL https://raw.githubusercontent.com/zdzichu6969/pyTorrent/master/scripts/install_stack.sh | sudo bash
|
||||
#
|
||||
# The script downloads the current pyTorrent repository, detects the OS family,
|
||||
# and runs the matching installer from scripts/stack_installers/.
|
||||
@@ -13,13 +13,37 @@ if [[ "${EUID}" -ne 0 ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
REPO_URL="${PYTORRENT_REPO_URL:-https://git.linuxiarz.pl/gru/pyTorrent}"
|
||||
REPO_URL="${PYTORRENT_REPO_URL:-https://github.com/zdzichu6969/pyTorrent}"
|
||||
REPO_BRANCH="${PYTORRENT_REPO_BRANCH:-master}"
|
||||
WORK_DIR="${PYTORRENT_BOOTSTRAP_DIR:-/tmp/pytorrent-stack-installer}"
|
||||
KEEP_WORK_DIR="${PYTORRENT_KEEP_BOOTSTRAP_DIR:-0}"
|
||||
|
||||
RAW_BASE="${REPO_URL%/}/raw/branch/${REPO_BRANCH}"
|
||||
ARCHIVE_URL="${PYTORRENT_ARCHIVE_URL:-${REPO_URL%/}/archive/${REPO_BRANCH}.tar.gz}"
|
||||
default_archive_url() {
|
||||
case "${REPO_URL%/}" in
|
||||
https://github.com/*)
|
||||
printf '%s/archive/refs/heads/%s.tar.gz\n' "${REPO_URL%/}" "${REPO_BRANCH}"
|
||||
;;
|
||||
*)
|
||||
printf '%s/archive/%s.tar.gz\n' "${REPO_URL%/}" "${REPO_BRANCH}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
default_raw_base() {
|
||||
case "${REPO_URL%/}" in
|
||||
https://github.com/*)
|
||||
local path
|
||||
path="${REPO_URL#https://github.com/}"
|
||||
printf 'https://raw.githubusercontent.com/%s/%s\n' "${path%/}" "${REPO_BRANCH}"
|
||||
;;
|
||||
*)
|
||||
printf '%s/raw/branch/%s\n' "${REPO_URL%/}" "${REPO_BRANCH}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
RAW_BASE="${PYTORRENT_RAW_BASE:-$(default_raw_base)}"
|
||||
ARCHIVE_URL="${PYTORRENT_ARCHIVE_URL:-$(default_archive_url)}"
|
||||
PROJECT_DIR="${WORK_DIR}/src"
|
||||
ARCHIVE_PATH="${WORK_DIR}/pytorrent.tar.gz"
|
||||
|
||||
@@ -142,7 +166,7 @@ if ! download_file "${ARCHIVE_URL}" "${ARCHIVE_PATH}"; then
|
||||
install_rtorrent.py \
|
||||
install_rtorrent_rhel.py \
|
||||
configure_pytorrent_api.py \
|
||||
INSTALL_STACK.md
|
||||
INSTALL.md
|
||||
do
|
||||
download_file "${RAW_BASE}/scripts/stack_installers/${file}" "${PROJECT_DIR}/scripts/stack_installers/${file}"
|
||||
done
|
||||
|
||||
@@ -12,7 +12,7 @@ The installer is split into two layers:
|
||||
Run as root or through `sudo`:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.linuxiarz.pl/gru/pyTorrent/raw/branch/master/scripts/install_stack.sh | sudo bash
|
||||
curl -fsSL https://raw.githubusercontent.com/zdzichu6969/pyTorrent/master/scripts/install_stack.sh | sudo bash
|
||||
```
|
||||
|
||||
The bootstrap script downloads the current pyTorrent repository, detects the operating system family, and runs the matching installer:
|
||||
@@ -46,14 +46,14 @@ Environment variables must be passed to the `sudo bash` process.
|
||||
Example:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.linuxiarz.pl/gru/pyTorrent/raw/branch/master/scripts/install_stack.sh \
|
||||
curl -fsSL https://raw.githubusercontent.com/zdzichu6969/pyTorrent/master/scripts/install_stack.sh \
|
||||
| sudo PYTORRENT_PORT=8091 RTORRENT_SCGI_PORT=5001 bash
|
||||
```
|
||||
|
||||
Another example with a custom profile name:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.linuxiarz.pl/gru/pyTorrent/raw/branch/master/scripts/install_stack.sh \
|
||||
curl -fsSL https://raw.githubusercontent.com/zdzichu6969/pyTorrent/master/scripts/install_stack.sh \
|
||||
| sudo PYTORRENT_PROFILE_NAME="Local rTorrent" PYTORRENT_PORT=8090 bash
|
||||
```
|
||||
|
||||
@@ -63,7 +63,7 @@ These variables are used by `scripts/install_stack.sh`.
|
||||
|
||||
| Variable | Default | Description |
|
||||
| --- | --- | --- |
|
||||
| `PYTORRENT_REPO_URL` | `https://git.linuxiarz.pl/gru/pyTorrent` | Git repository base URL. |
|
||||
| `PYTORRENT_REPO_URL` | `https://github.com/zdzichu6969/pyTorrent` | GitHub repository base URL. |
|
||||
| `PYTORRENT_REPO_BRANCH` | `master` | Branch used to download the repository archive. |
|
||||
| `PYTORRENT_ARCHIVE_URL` | derived from repo URL and branch | Custom repository archive URL. |
|
||||
| `PYTORRENT_BOOTSTRAP_DIR` | `/tmp/pytorrent-stack-installer` | Temporary directory used by the bootstrap script. |
|
||||
@@ -72,7 +72,7 @@ These variables are used by `scripts/install_stack.sh`.
|
||||
Example using a different branch:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.linuxiarz.pl/gru/pyTorrent/raw/branch/master/scripts/install_stack.sh \
|
||||
curl -fsSL https://raw.githubusercontent.com/zdzichu6969/pyTorrent/master/scripts/install_stack.sh \
|
||||
| sudo PYTORRENT_REPO_BRANCH=develop bash
|
||||
```
|
||||
|
||||
@@ -96,14 +96,14 @@ These variables are used by both stack installers.
|
||||
Example:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.linuxiarz.pl/gru/pyTorrent/raw/branch/master/scripts/install_stack.sh \
|
||||
curl -fsSL https://raw.githubusercontent.com/zdzichu6969/pyTorrent/master/scripts/install_stack.sh \
|
||||
| sudo RTORRENT_USER=rtorrent RTORRENT_SCGI_PORT=5001 RTORRENT_TORRENT_PORT=51400 bash
|
||||
```
|
||||
|
||||
Classic xmlrpc-c backend instead of default tinyxml2. On Arch this forces source build:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.linuxiarz.pl/gru/pyTorrent/raw/branch/master/scripts/install_stack.sh \
|
||||
curl -fsSL https://raw.githubusercontent.com/zdzichu6969/pyTorrent/master/scripts/install_stack.sh \
|
||||
| sudo RTORRENT_WITH_XMLRPC_C=1 bash
|
||||
```
|
||||
|
||||
@@ -122,7 +122,7 @@ curl -fsSL https://git.linuxiarz.pl/gru/pyTorrent/raw/branch/master/scripts/inst
|
||||
Example with API token:
|
||||
|
||||
```bash
|
||||
curl -fsSL https://git.linuxiarz.pl/gru/pyTorrent/raw/branch/master/scripts/install_stack.sh \
|
||||
curl -fsSL https://raw.githubusercontent.com/zdzichu6969/pyTorrent/master/scripts/install_stack.sh \
|
||||
| sudo PYTORRENT_API_TOKEN="pt_xxx" bash
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user