From 37a45740bf7500cb83be1783f742601f18238797 Mon Sep 17 00:00:00 2001 From: casjay Date: Wed, 19 Oct 2022 18:22:33 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Committing=20everything?= =?UTF-8?q?=20that=20changed=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rootfs/usr/local/bin/start-aria2.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rootfs/usr/local/bin/start-aria2.sh b/rootfs/usr/local/bin/start-aria2.sh index d0a4acb..d57cfa4 100755 --- a/rootfs/usr/local/bin/start-aria2.sh +++ b/rootfs/usr/local/bin/start-aria2.sh @@ -72,7 +72,7 @@ CONTAINER_IP_ADDRESS="$(ip a 2>/dev/null | grep 'inet' | grep -v '127.0.0.1' | a # Overwrite variables SERVICE_PORT="${ARIA2RPCPORT:-8080}" SERVICE_NAME="aria2" -SERVICE_COMMAND="aria2c --conf-path=/etc/aria2.conf" +SERVICE_COMMAND="aria2c --conf-path=/config/aria2/aria2.conf" export exec_message="Starting $SERVICE_NAME on $CONTAINER_IP_ADDRESS:$SERVICE_PORT" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Pre copy commands @@ -110,17 +110,17 @@ fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if [ -n "$RPC_SECRET" ]; then echo "Changing rpc secret to $RPC_SECRET" - grep -sq "rpc-secret=*" "/etc/aria2.conf" || - echo "rpc-secret=$RPC_SECRET" >>"/etc/aria2.conf" || - sed -i "s|rpc-secret=.*|rpc-secret=$RPC_SECRET|g" "/etc/aria2.conf" + grep -sq "rpc-secret=*" "/config/aria2.conf" || + echo "rpc-secret=$RPC_SECRET" >>"/config/aria2.conf" || + sed -i "s|rpc-secret=.*|rpc-secret=$RPC_SECRET|g" "/config/aria2.conf" sed -i "s|secret: |secret: $RPC_SECRET|g" "/var/www/ariang/js/aria-ng-f1dd57abb9.min.js" fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # allow Changing of port [unsupported] if [ -n "$SERVICE_PORT" ] && [ "$SERVICE_PORT" != "8080" ]; then echo "Changing rpc request port to $SERVICE_PORT" - sed -i "s|8080|${SERVICE_PORT}|g" "/etc/nginx/nginx.conf" - sed -i "ss|8080|${SERVICE_PORT}|g" "/var/www/ariang/js/aria-ng-f1dd57abb9.min.js" + sed -i "s|rpc-listen-port=.*|rpc-listen-port=${SERVICE_PORT}|g" "/config/nginx/nginx.conf" + sed -i "s|rpcPort: *,|rpcPort: ''${SERVICE_PORT}'',|g" "/var/www/ariang/js/aria-ng-f1dd57abb9.min.js" fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Initialized