install scrpts
This commit is contained in:
@@ -3,7 +3,7 @@ set -euo pipefail
|
||||
|
||||
# One-command installer for rTorrent + pyTorrent on Debian/Ubuntu.
|
||||
# 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_debian_stack_prerequisites() {
|
||||
@@ -59,6 +76,7 @@ install_debian_stack_prerequisites() {
|
||||
libexpat1-dev \
|
||||
libcurl4-openssl-dev \
|
||||
libxml2-dev \
|
||||
libtinyxml2-dev \
|
||||
libreadline-dev \
|
||||
zlib1g-dev \
|
||||
bison \
|
||||
@@ -78,6 +96,7 @@ install_debian_stack_prerequisites
|
||||
RTORRENT_INSTALL_ARGS=(
|
||||
--yes
|
||||
--minimal
|
||||
"${RTORRENT_EXTRA_ARGS[@]}"
|
||||
)
|
||||
if [[ "${PYTORRENT_DEBUG_INSTALL:-0}" == "1" ]]; then
|
||||
RTORRENT_INSTALL_ARGS+=(--debug)
|
||||
|
||||
Reference in New Issue
Block a user