mirror of
https://github.com/casjaysdevdocker/aria2
synced 2025-01-18 06:34:24 -05:00
🗃️ Committing everything that changed 🗃️
This commit is contained in:
parent
37a45740bf
commit
ee28a2cb86
@ -70,7 +70,8 @@ CONTAINER_IP_ADDRESS="$(ip a 2>/dev/null | grep 'inet' | grep -v '127.0.0.1' | a
|
||||
[ "$HTTPS_PORT" = "443" ] && HTTP_PORT="$HTTPS_PORT" && SSL_ENABLED="true"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Overwrite variables
|
||||
SERVICE_PORT="${ARIA2RPCPORT:-8080}"
|
||||
RPC_SECRET="${RPC_SECRET:-}"
|
||||
SERVICE_PORT=""
|
||||
SERVICE_NAME="aria2"
|
||||
SERVICE_COMMAND="aria2c --conf-path=/config/aria2/aria2.conf"
|
||||
export exec_message="Starting $SERVICE_NAME on $CONTAINER_IP_ADDRESS:$SERVICE_PORT"
|
||||
@ -110,19 +111,12 @@ fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
if [ -n "$RPC_SECRET" ]; then
|
||||
echo "Changing rpc secret to $RPC_SECRET"
|
||||
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"
|
||||
grep -sq "rpc-secret=*" "/config/aria2/aria2.conf" ||
|
||||
echo "rpc-secret=$RPC_SECRET" >>"/config/aria2/aria2.conf" ||
|
||||
sed -i "s|rpc-secret=.*|rpc-secret=$RPC_SECRET|g" "/config/aria2/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|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
|
||||
[ -d "/data" ] && touch "/data/.docker_has_run"
|
||||
[ -d "/config" ] && touch "/config/.docker_has_run"
|
||||
|
@ -70,7 +70,7 @@ CONTAINER_IP_ADDRESS="$(ip a 2>/dev/null | grep 'inet' | grep -v '127.0.0.1' | a
|
||||
[ "$HTTPS_PORT" = "443" ] && HTTP_PORT="$HTTPS_PORT" && SSL_ENABLED="true"
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Overwrite variables
|
||||
SERVICE_PORT="6800"
|
||||
SERVICE_PORT="${ARIA2RPCPORT:-6800}"
|
||||
SERVICE_NAME="nginx"
|
||||
SERVICE_COMMAND="nginx -c /etc/nginx/nginx.conf"
|
||||
export exec_message="Starting $SERVICE_NAME on $CONTAINER_IP_ADDRESS:$SERVICE_PORT"
|
||||
@ -103,7 +103,11 @@ if [ "$DATA_DIR_INITIALIZED" = "false" ] && [ -d "$DEFAULT_DATA_DIR/data/htdocs"
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Post copy commands
|
||||
|
||||
# allow Changing of port [unsupported]
|
||||
if [ -n "$SERVICE_PORT" ] && [ "$SERVICE_PORT" != "6800" ]; then
|
||||
echo "Changing rpc request port to $SERVICE_PORT"
|
||||
sed -i "s|listen .*|listen ${SERVICE_PORT}|g" "/config/nginx/nginx.conf"
|
||||
fi
|
||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||
# Initialized
|
||||
[ -d "/data" ] && touch "/data/.docker_has_run"
|
||||
|
@ -525,7 +525,7 @@
|
||||
browserNotification: !1,
|
||||
rpcAlias: '',
|
||||
rpcHost: 'localhost',
|
||||
rpcPort: '8080',
|
||||
rpcPort: '6800',
|
||||
rpcInterface: 'jsonrpc',
|
||||
protocol: 'ws',
|
||||
httpMethod: 'POST',
|
||||
@ -2106,7 +2106,7 @@
|
||||
'rpc-listen-port': {
|
||||
type: 'integer',
|
||||
readonly: !0,
|
||||
defaultValue: '8080',
|
||||
defaultValue: '6080',
|
||||
},
|
||||
'rpc-max-request-size': {
|
||||
type: 'string',
|
||||
@ -2155,7 +2155,7 @@
|
||||
'conf-path': {
|
||||
type: 'string',
|
||||
readonly: !0,
|
||||
defaultValue: '/etc/aria2.conf',
|
||||
defaultValue: '/config/aria2/aria2.conf',
|
||||
},
|
||||
'console-log-level': {
|
||||
type: 'option',
|
||||
|
Loading…
x
Reference in New Issue
Block a user