mirror of
				https://github.com/casjaysdevdocker/aria2
				synced 2025-11-04 01:02:43 -05:00 
			
		
		
		
	🗃️ Committing everything that changed 🗃️
This commit is contained in:
		@@ -54,10 +54,10 @@ SERVICE_UID="0"     # set the user id for creation of user
 | 
			
		||||
SERVICE_PORT=""     # specifiy port which service is listening on
 | 
			
		||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
			
		||||
# Healthcheck variables
 | 
			
		||||
HEALTH_ENABLED="yes" # enable healthcheck [yes/no]
 | 
			
		||||
SERVICES_LIST="tini" # comma seperated list of processes for the healthcheck
 | 
			
		||||
SERVER_PORTS=""      # ports : 80,443
 | 
			
		||||
HEALTH_ENDPOINTS=""  # url endpoints: [http://localhost/health,http://localhost/test]
 | 
			
		||||
HEALTH_ENABLED="yes"              # enable healthcheck [yes/no]
 | 
			
		||||
SERVICES_LIST="tini,nginx,aria2c" # comma seperated list of processes for the healthcheck
 | 
			
		||||
SERVER_PORTS="80"                 # ports : 80,443
 | 
			
		||||
HEALTH_ENDPOINTS=""               # url endpoints: [http://localhost/health,http://localhost/test]
 | 
			
		||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
			
		||||
# Additional
 | 
			
		||||
PHP_INI_DIR="${PHP_INI_DIR:-$(__find_php_ini)}"
 | 
			
		||||
@@ -73,24 +73,7 @@ MONGODB_CONFIG_FILE="${MONGODB_CONFIG_FILE:-$(__find_mongodb_conf)}"
 | 
			
		||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
			
		||||
# Last thing to run before options
 | 
			
		||||
__run_pre() {
 | 
			
		||||
  if [ "$ENTRYPOINT_FIRST_RUN" = "false" ]; then # Run on initial creation
 | 
			
		||||
    true
 | 
			
		||||
  fi
 | 
			
		||||
  if [ "$CONFIG_DIR_INITIALIZED" = "false" ]; then # Initial config
 | 
			
		||||
    true
 | 
			
		||||
  fi
 | 
			
		||||
  if [ "$DATA_DIR_INITIALIZED" = "false" ]; then
 | 
			
		||||
    true
 | 
			
		||||
  fi
 | 
			
		||||
  # End Initial config
 | 
			
		||||
  if [ "$START_SERVICES" = "yes" ]; then # only run on start
 | 
			
		||||
    true
 | 
			
		||||
  fi # end run on start
 | 
			
		||||
  # Run everytime container starts
 | 
			
		||||
  # __certbot
 | 
			
		||||
  # __create_ssl_cert
 | 
			
		||||
  # __update_ssl_certs
 | 
			
		||||
  # end
 | 
			
		||||
 | 
			
		||||
  return 0
 | 
			
		||||
}
 | 
			
		||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
			
		||||
 
 | 
			
		||||
@@ -32,7 +32,6 @@ EXEC_CMD_ARGS="--conf-path=/etc/aria2/aria2.conf" # command arguments
 | 
			
		||||
PRE_EXEC_MESSAGE=""                               # Show message before execute
 | 
			
		||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
			
		||||
# Other variables that are needed
 | 
			
		||||
ARIA2RPCPORT="${ARIA2RPCPORT:-8000}"
 | 
			
		||||
etc_dir="/etc/aria2"
 | 
			
		||||
conf_dir="/config/aria2"
 | 
			
		||||
www_dir="/usr/local/share/ariang"
 | 
			
		||||
@@ -48,16 +47,11 @@ __update_conf_files() {
 | 
			
		||||
  cp -Rf "$conf_dir/." "$etc_dir/"
 | 
			
		||||
  ln -sf "/dev/stdout" "/var/log/aria2/aria2.log"
 | 
			
		||||
  ln -sf "$conf_dir/aria2.session" "$etc_dir/aria2.session"
 | 
			
		||||
  __replace "ARIA_RPC_PORT" "$port" "$etc_dir/aria2.conf"
 | 
			
		||||
  if [ -f "/config/nginx/nginx.conf" ]; then
 | 
			
		||||
    __replace "127.0.0.1:.*/jsonrpc" "127.0.0.1:$port/jsonrpc" "/config/nginx/nginx.conf"
 | 
			
		||||
  fi
 | 
			
		||||
  if [ -f "$etc_dir/aria-ng.config.js" ]; then
 | 
			
		||||
    rm -Rf "$get_config"
 | 
			
		||||
    ln -sf "$etc_dir/aria-ng.config.js" "$get_config"
 | 
			
		||||
    ln -sf "$etc_dir/aria-ng.config.js" "$www_dir/js/aria-ng-f1dd57abb9.min.js"
 | 
			
		||||
    __replace "127.0.0.1" "0.0.0.0" "$etc_dir/aria-ng.config.js"
 | 
			
		||||
    __replace "ARIA_RPC_PORT" "$port" "$etc_dir/aria-ng.config.js"
 | 
			
		||||
  fi
 | 
			
		||||
  if [ -n "$RPC_SECRET" ]; then
 | 
			
		||||
    echo "Changing rpc secret to $RPC_SECRET"
 | 
			
		||||
 
 | 
			
		||||
@@ -525,7 +525,7 @@
 | 
			
		||||
        browserNotification: !1,
 | 
			
		||||
        rpcAlias: 'aria2',
 | 
			
		||||
        rpcHost: '127.0.0.1',
 | 
			
		||||
        rpcPort: 'ARIA_RPC_PORT',
 | 
			
		||||
        rpcPort: '8000',
 | 
			
		||||
        rpcInterface: 'jsonrpc',
 | 
			
		||||
        protocol: 'http',
 | 
			
		||||
        httpMethod: 'POST',
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@ log=/var/log/aria2/aria2.log
 | 
			
		||||
input-file=/config/aria2/aria2.session
 | 
			
		||||
save-session=/config/aria2/aria2.session
 | 
			
		||||
enable-rpc=true
 | 
			
		||||
rpc-listen-port=ARIA_RPC_PORT
 | 
			
		||||
rpc-listen-port=8000
 | 
			
		||||
rpc-allow-origin-all=true
 | 
			
		||||
rpc-listen-all=true
 | 
			
		||||
disable-ipv6=true
 | 
			
		||||
 
 | 
			
		||||
@@ -35,7 +35,7 @@ http {
 | 
			
		||||
        add_header Content-Security-Policy   "script-src 'self' 'unsafe-inline' 'unsafe-eval' *; frame-src 'self' *; object-src 'self'" always;
 | 
			
		||||
 | 
			
		||||
    location /jsonrpc {
 | 
			
		||||
        proxy_pass         http://127.0.0.1:ARIA_RPC_PORT/jsonrpc;
 | 
			
		||||
        proxy_pass         http://127.0.0.1:8000/jsonrpc;
 | 
			
		||||
        proxy_http_version 1.1;
 | 
			
		||||
        proxy_set_header   Upgrade $http_upgrade;
 | 
			
		||||
        proxy_set_header   Connection "upgrade";
 | 
			
		||||
@@ -43,7 +43,7 @@ http {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    location /rpc {
 | 
			
		||||
        proxy_pass         http://127.0.0.1:ARIA_RPC_PORT/jsonrpc;
 | 
			
		||||
        proxy_pass         http://127.0.0.1:8000/jsonrpc;
 | 
			
		||||
        proxy_http_version 1.1;
 | 
			
		||||
        proxy_set_header   Upgrade $http_upgrade;
 | 
			
		||||
        proxy_set_header   Connection "upgrade";
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user