🗃️ Committing everything that changed 🗃️

This commit is contained in:
casjay 2022-10-19 18:35:25 -04:00
parent 37a45740bf
commit ee28a2cb86
No known key found for this signature in database
GPG Key ID: 4F765975C1F0EE5F
3 changed files with 14 additions and 16 deletions

View File

@ -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" [ "$HTTPS_PORT" = "443" ] && HTTP_PORT="$HTTPS_PORT" && SSL_ENABLED="true"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Overwrite variables # Overwrite variables
SERVICE_PORT="${ARIA2RPCPORT:-8080}" RPC_SECRET="${RPC_SECRET:-}"
SERVICE_PORT=""
SERVICE_NAME="aria2" SERVICE_NAME="aria2"
SERVICE_COMMAND="aria2c --conf-path=/config/aria2/aria2.conf" SERVICE_COMMAND="aria2c --conf-path=/config/aria2/aria2.conf"
export exec_message="Starting $SERVICE_NAME on $CONTAINER_IP_ADDRESS:$SERVICE_PORT" export exec_message="Starting $SERVICE_NAME on $CONTAINER_IP_ADDRESS:$SERVICE_PORT"
@ -110,19 +111,12 @@ fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if [ -n "$RPC_SECRET" ]; then if [ -n "$RPC_SECRET" ]; then
echo "Changing rpc secret to $RPC_SECRET" echo "Changing rpc secret to $RPC_SECRET"
grep -sq "rpc-secret=*" "/config/aria2.conf" || grep -sq "rpc-secret=*" "/config/aria2/aria2.conf" ||
echo "rpc-secret=$RPC_SECRET" >>"/config/aria2.conf" || echo "rpc-secret=$RPC_SECRET" >>"/config/aria2/aria2.conf" ||
sed -i "s|rpc-secret=.*|rpc-secret=$RPC_SECRET|g" "/config/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" sed -i "s|secret: |secret: $RPC_SECRET|g" "/var/www/ariang/js/aria-ng-f1dd57abb9.min.js"
fi 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 # Initialized
[ -d "/data" ] && touch "/data/.docker_has_run" [ -d "/data" ] && touch "/data/.docker_has_run"
[ -d "/config" ] && touch "/config/.docker_has_run" [ -d "/config" ] && touch "/config/.docker_has_run"

View File

@ -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" [ "$HTTPS_PORT" = "443" ] && HTTP_PORT="$HTTPS_PORT" && SSL_ENABLED="true"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Overwrite variables # Overwrite variables
SERVICE_PORT="6800" SERVICE_PORT="${ARIA2RPCPORT:-6800}"
SERVICE_NAME="nginx" SERVICE_NAME="nginx"
SERVICE_COMMAND="nginx -c /etc/nginx/nginx.conf" SERVICE_COMMAND="nginx -c /etc/nginx/nginx.conf"
export exec_message="Starting $SERVICE_NAME on $CONTAINER_IP_ADDRESS:$SERVICE_PORT" 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 fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Post copy commands # 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 # Initialized
[ -d "/data" ] && touch "/data/.docker_has_run" [ -d "/data" ] && touch "/data/.docker_has_run"

View File

@ -525,7 +525,7 @@
browserNotification: !1, browserNotification: !1,
rpcAlias: '', rpcAlias: '',
rpcHost: 'localhost', rpcHost: 'localhost',
rpcPort: '8080', rpcPort: '6800',
rpcInterface: 'jsonrpc', rpcInterface: 'jsonrpc',
protocol: 'ws', protocol: 'ws',
httpMethod: 'POST', httpMethod: 'POST',
@ -2106,7 +2106,7 @@
'rpc-listen-port': { 'rpc-listen-port': {
type: 'integer', type: 'integer',
readonly: !0, readonly: !0,
defaultValue: '8080', defaultValue: '6080',
}, },
'rpc-max-request-size': { 'rpc-max-request-size': {
type: 'string', type: 'string',
@ -2155,7 +2155,7 @@
'conf-path': { 'conf-path': {
type: 'string', type: 'string',
readonly: !0, readonly: !0,
defaultValue: '/etc/aria2.conf', defaultValue: '/config/aria2/aria2.conf',
}, },
'console-log-level': { 'console-log-level': {
type: 'option', type: 'option',