File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 1
- #! /bin/bash -euo
1
+ #! /bin/bash -eu
2
2
3
3
sed -i ' s/6800/' " ${ARIA2_EXTERNAL_PORT} " ' /g' /usr/local/www/aria2/js/aria-ng* .js
4
4
RPC_SECRET_BASE64=$( echo -n ${RPC_SECRET} | base64)
5
5
sed -i ' s/secret:\"\"/secret:\"' " ${RPC_SECRET_BASE64} " ' \"/g' /usr/local/www/aria2/js/aria-ng* .js
6
6
7
- if [ " $ARIA2_SSL " = " true" ]; then
7
+ if [[ " ${ ARIA2_SSL} " = " true" ] ]; then
8
8
echo " [INFO] Start aria2 with secure config and rpc-secret"
9
9
10
10
/usr/bin/aria2c --conf-path=" /app/conf/aria2.conf" \
@@ -13,15 +13,13 @@ if [ "$ARIA2_SSL" = "true" ]; then
13
13
--rpc-private-key=/app/conf/key/aria2.key \
14
14
--rpc-secret=" ${RPC_SECRET} " --rpc-secure
15
15
16
- elif [ " $ARIA2_SSL " = " false" && ${RPC_SECRET} != " " ]; then
16
+ elif [[ " ${ ARIA2_SSL} " = " false" ]] && [[ " ${RPC_SECRET} " != " " ] ]; then
17
17
echo " [INFO] Start aria2 with rpc-secret"
18
18
/usr/bin/aria2c --conf-path=" /app/conf/aria2.conf" \
19
19
--enable-rpc \
20
20
--rpc-listen-all \
21
21
--rpc-secret=" ${RPC_SECRET} "
22
-
23
22
else
24
-
25
23
echo " [INFO] Start aria2 with standard mode"
26
24
/usr/bin/aria2c --conf-path=" /app/conf/aria2.conf" --enable-rpc --rpc-listen-all
27
25
You can’t perform that action at this time.
0 commit comments