install scrpts
This commit is contained in:
@@ -3,7 +3,7 @@ set -euo pipefail
|
||||
|
||||
# One-command installer for rTorrent + pyTorrent on RHEL-compatible systems.
|
||||
# Notes:
|
||||
# - rTorrent is built as a minimal v0.16.11 install by default.
|
||||
# - rTorrent is built as a minimal v0.16.11 install with tinyxml2 XML-RPC by default.
|
||||
# - pyTorrent is configured through its HTTP API after the service starts.
|
||||
|
||||
if [[ "${EUID}" -ne 0 ]]; then
|
||||
@@ -29,6 +29,23 @@ PYTORRENT_API_TOKEN="${PYTORRENT_API_TOKEN:-}"
|
||||
PYTORRENT_SERVICE_NAME="${PYTORRENT_SERVICE_NAME:-pytorrent}"
|
||||
PYTORRENT_RTORRENT_SCGI_URL="${PYTORRENT_RTORRENT_SCGI_URL:-scgi://127.0.0.1:${RTORRENT_SCGI_PORT}}"
|
||||
|
||||
RTORRENT_EXTRA_ARGS=()
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--with-xmlrpc-c)
|
||||
RTORRENT_EXTRA_ARGS+=(--with-xmlrpc-c)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo "Unknown option: $1" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
if [[ "${RTORRENT_WITH_XMLRPC_C:-0}" == "1" ]]; then
|
||||
RTORRENT_EXTRA_ARGS+=(--with-xmlrpc-c)
|
||||
fi
|
||||
|
||||
export PYTORRENT_APP_DIR PYTORRENT_PORT PYTORRENT_SERVICE_NAME PYTORRENT_API_TOKEN
|
||||
|
||||
install_rhel_stack_prerequisites() {
|
||||
@@ -65,6 +82,7 @@ install_rhel_stack_prerequisites() {
|
||||
ncurses-devel \
|
||||
openssl-devel \
|
||||
expat-devel \
|
||||
tinyxml2-devel \
|
||||
zlib-devel \
|
||||
libcurl-devel \
|
||||
redhat-rpm-config \
|
||||
@@ -81,6 +99,7 @@ install_rhel_stack_prerequisites
|
||||
RTORRENT_INSTALL_ARGS=(
|
||||
--yes
|
||||
--minimal
|
||||
"${RTORRENT_EXTRA_ARGS[@]}"
|
||||
--force-config
|
||||
)
|
||||
if [[ "${PYTORRENT_DEBUG_INSTALL:-0}" == "1" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user