From 16760ba89345cd69145b33a55168ca149f2f4c85 Mon Sep 17 00:00:00 2001 From: casjay Date: Tue, 14 Mar 2023 17:00:27 -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/entrypoint.sh | 27 ++++--------------- .../usr/local/etc/docker/init.d/00-aria2c.sh | 6 ----- .../config/aria2/aria-ng.config.js | 2 +- .../template-files/config/aria2/aria2.conf | 2 +- .../template-files/config/nginx/nginx.conf | 4 +-- 5 files changed, 9 insertions(+), 32 deletions(-) diff --git a/rootfs/usr/local/bin/entrypoint.sh b/rootfs/usr/local/bin/entrypoint.sh index b6b041f..76fb8db 100755 --- a/rootfs/usr/local/bin/entrypoint.sh +++ b/rootfs/usr/local/bin/entrypoint.sh @@ -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 } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/rootfs/usr/local/etc/docker/init.d/00-aria2c.sh b/rootfs/usr/local/etc/docker/init.d/00-aria2c.sh index f06ec19..cca9f38 100755 --- a/rootfs/usr/local/etc/docker/init.d/00-aria2c.sh +++ b/rootfs/usr/local/etc/docker/init.d/00-aria2c.sh @@ -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" diff --git a/rootfs/usr/local/share/template-files/config/aria2/aria-ng.config.js b/rootfs/usr/local/share/template-files/config/aria2/aria-ng.config.js index 6011a55..b078b6c 100755 --- a/rootfs/usr/local/share/template-files/config/aria2/aria-ng.config.js +++ b/rootfs/usr/local/share/template-files/config/aria2/aria-ng.config.js @@ -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', diff --git a/rootfs/usr/local/share/template-files/config/aria2/aria2.conf b/rootfs/usr/local/share/template-files/config/aria2/aria2.conf index 501c01e..306bb81 100644 --- a/rootfs/usr/local/share/template-files/config/aria2/aria2.conf +++ b/rootfs/usr/local/share/template-files/config/aria2/aria2.conf @@ -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 diff --git a/rootfs/usr/local/share/template-files/config/nginx/nginx.conf b/rootfs/usr/local/share/template-files/config/nginx/nginx.conf index c945f08..4379ee3 100644 --- a/rootfs/usr/local/share/template-files/config/nginx/nginx.conf +++ b/rootfs/usr/local/share/template-files/config/nginx/nginx.conf @@ -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";