mirror of
https://github.com/wahyd4/aria2-ariang-docker.git
synced 2026-08-08 21:05:50 +10:00
fix syntax error in aria2c.sh (#230)
* fix syntax error in aria2c.sh * fix syntax error
This commit is contained in:
@@ -1,10 +1,10 @@
|
|||||||
#! /bin/bash -euo
|
#! /bin/bash -eu
|
||||||
|
|
||||||
sed -i 's/6800/'"${ARIA2_EXTERNAL_PORT}"'/g' /usr/local/www/aria2/js/aria-ng*.js
|
sed -i 's/6800/'"${ARIA2_EXTERNAL_PORT}"'/g' /usr/local/www/aria2/js/aria-ng*.js
|
||||||
RPC_SECRET_BASE64=$(echo -n ${RPC_SECRET} | base64)
|
RPC_SECRET_BASE64=$(echo -n ${RPC_SECRET} | base64)
|
||||||
sed -i 's/secret:\"\"/secret:\"'"${RPC_SECRET_BASE64}"'\"/g' /usr/local/www/aria2/js/aria-ng*.js
|
sed -i 's/secret:\"\"/secret:\"'"${RPC_SECRET_BASE64}"'\"/g' /usr/local/www/aria2/js/aria-ng*.js
|
||||||
|
|
||||||
if [ "$ARIA2_SSL" = "true" ]; then
|
if [[ "${ARIA2_SSL}" = "true" ]]; then
|
||||||
echo "[INFO] Start aria2 with secure config and rpc-secret"
|
echo "[INFO] Start aria2 with secure config and rpc-secret"
|
||||||
|
|
||||||
/usr/bin/aria2c --conf-path="/app/conf/aria2.conf" \
|
/usr/bin/aria2c --conf-path="/app/conf/aria2.conf" \
|
||||||
@@ -13,15 +13,13 @@ if [ "$ARIA2_SSL" = "true" ]; then
|
|||||||
--rpc-private-key=/app/conf/key/aria2.key \
|
--rpc-private-key=/app/conf/key/aria2.key \
|
||||||
--rpc-secret="${RPC_SECRET}" --rpc-secure
|
--rpc-secret="${RPC_SECRET}" --rpc-secure
|
||||||
|
|
||||||
elif [ "$ARIA2_SSL" = "false" && ${RPC_SECRET} != "" ]; then
|
elif [[ "${ARIA2_SSL}" = "false" ]] && [[ "${RPC_SECRET}" != "" ]]; then
|
||||||
echo "[INFO] Start aria2 with rpc-secret"
|
echo "[INFO] Start aria2 with rpc-secret"
|
||||||
/usr/bin/aria2c --conf-path="/app/conf/aria2.conf" \
|
/usr/bin/aria2c --conf-path="/app/conf/aria2.conf" \
|
||||||
--enable-rpc \
|
--enable-rpc \
|
||||||
--rpc-listen-all \
|
--rpc-listen-all \
|
||||||
--rpc-secret="${RPC_SECRET}"
|
--rpc-secret="${RPC_SECRET}"
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
echo "[INFO] Start aria2 with standard mode"
|
echo "[INFO] Start aria2 with standard mode"
|
||||||
/usr/bin/aria2c --conf-path="/app/conf/aria2.conf" --enable-rpc --rpc-listen-all
|
/usr/bin/aria2c --conf-path="/app/conf/aria2.conf" --enable-rpc --rpc-listen-all
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user