mirror of
https://github.com/casjaysdevdocker/aria2
synced 2025-09-18 09:57:40 -04:00
🗃️ Committing everything that changed 🗃️
rootfs/tmp/etc/aria2/aria-ng.config.js rootfs/tmp/etc/nginx/nginx.conf rootfs/usr/local/etc/docker/init.d/00-aria2c.sh rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
This commit is contained in:
@@ -224,6 +224,7 @@ __update_conf_files() {
|
||||
local get_data_dir="$(grep -Rs 'dir=' "/config/aria2/aria2.conf" | awk -F'=' '{print $2}')"
|
||||
local get_config="$(find "$WWW_ROOT_DIR/js" -name 'aria-ng-*.min.js' | grep -v 'f1dd57abb9.min' | head -n1)"
|
||||
local get_session_file="$(grep -Rs 'aria2.session' "/config/aria2/aria2.conf" | awk -F'=' '{print $2}' | head -n1)"
|
||||
local rpc_port="${RPC_PORT:-${RPC_LISTEN:-6800}}"
|
||||
local dht_port="$DHT_LISTEN_PORT"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# delete files
|
||||
@@ -234,8 +235,7 @@ __update_conf_files() {
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# replace variables
|
||||
__replace "REPLACE_RPC_PORT" "$SERVICE_PORT" "$CONF_DIR/aria2.conf"
|
||||
__replace "REPLACE_SERVER_PORT" "$SERVICE_PORT" "$CONF_DIR/aria-ng.config.js"
|
||||
__replace "REPLACE_RPC_PORT" "$rpc_port" "$CONF_DIR/aria2.conf"
|
||||
__replace "REPLACE_SERVER_ADDR" "$CONTAINER_IP4_ADDRESS" "$CONF_DIR/aria-ng.config.js"
|
||||
if [ -n "$RPC_SECRET" ]; then
|
||||
echo "Changing rpc secret to $RPC_SECRET"
|
||||
|
@@ -221,6 +221,7 @@ __run_pre_execute_checks() {
|
||||
__update_conf_files() {
|
||||
local exitCode=0 # default exit code
|
||||
local sysname="${SERVER_NAME:-${FULL_DOMAIN_NAME:-$HOSTNAME}}" # set hostname
|
||||
local rpc_port="${RPC_PORT:-${RPC_LISTEN:-6800}}"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# delete files
|
||||
#__rm ""
|
||||
@@ -230,10 +231,8 @@ __update_conf_files() {
|
||||
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# replace variables
|
||||
# __replace "" "" "$CONF_DIR/nginx.conf"
|
||||
# replace variables recursively
|
||||
# __find_replace "" "" "$CONF_DIR"
|
||||
|
||||
__replace "REPLACE_RPC_PORT" "$rpc_port" "$CONF_DIR/nginx.conf"
|
||||
__replace "REPLACE_SERVER_ADDR" "$CONTAINER_IP4_ADDRESS" "$CONF_DIR/nginx.conf"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# define actions
|
||||
|
||||
|
Reference in New Issue
Block a user