🗃️ Committing everything that changed 🗃️

This commit is contained in:
casjay 2023-03-14 19:23:50 -04:00
parent 16760ba893
commit 81de015f7d
No known key found for this signature in database
GPG Key ID: 4F765975C1F0EE5F
6 changed files with 13 additions and 12 deletions

View File

@ -85,13 +85,14 @@ __run_message() {
# rewrite variables
ENV_PORTS="${ENV_PORTS//,/ }"
ENV_PORTS="${ENV_PORTS//\/*/}"
SERVER_PORTS="${SERVER_PORTS//,/ }"
WEB_SERVER_PORTS="${SERVICE_PORT//\/*/}"
HEALTH_ENDPOINTS="${HEALTH_ENDPOINTS//,/ }"
WEB_SERVER_PORTS="${WEB_SERVER_PORTS//\/*/}"
WEB_SERVER_PORTS="${SERVICE_PORT//,/ } ${WEB_SERVER_PORTS//,/ }"
ENV_PORTS="$(echo "$ENV_PORTS" | tr ' ' '\n' | sort -u | grep -v '^$' | tr '\n' ' ' | grep '^' || false)"
WEB_SERVER_PORTS="$(echo "$WEB_SERVER_PORTS" | tr ' ' '\n' | sort -u | grep -v '^$' | tr '\n' ' ' | grep '^' || false)"
ENV_PORTS="$(echo "$WEB_SERVER_PORTS $ENV_PORTS $SERVER_PORTS" | tr ' ' '\n' | sort -u | grep -v '^$' | tr '\n' ' ' | grep '^' || false)"
ENV_PORTS="$(echo "$SERVER_PORTS" "$WEB_SERVER_PORTS" "$ENV_PORTS" "$SERVER_PORTS" | tr ' ' '\n' | sort -u | grep -v '^$' | tr '\n' ' ' | grep '^' || false)"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# variables based on env/files
[ "$SERVICE_PORT" = "443" ] && SSL_ENABLED="true"
@ -112,21 +113,21 @@ DEFAULT_TEMPLATE_DIR="${DEFAULT_TEMPLATE_DIR:-/usr/local/share/template-files/de
mkdir -p "/run"
mkdir -p "/tmp"
mkdir -p "/root"
mkdir -p "/var/log"
mkdir -p "/data/logs"
mkdir -p "/run/init.d"
mkdir -p "/config/secure"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# create required files
touch "/var/log/entrypoint.log"
touch "/data/logs/entrypoint.log"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# fix permissions
chmod -f 777 "/run"
chmod -f 777 "/tmp"
chmod -f 700 "/root"
chmod -f 777 "/var/log"
chmod -f 777 "/data/logs"
chmod -f 777 "/run/init.d"
chmod -f 777 "/config/secure"
chmod -f 777 "/var/log/entrypoint.log"
chmod -f 777 "/data/logs/entrypoint.log"
################## END OF CONFIGURATION #####################
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Create the backup dir

View File

@ -202,7 +202,7 @@ __cron() {
eval "$command"
sleep $interval
[ -f "/run/cron/$cmd" ] || break
done |& tee /var/log/entrypoint.log
done |& tee /data/logs/entrypoint.log
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
__replace() {

View File

@ -43,9 +43,9 @@ __update_conf_files() {
local port="${SERVICE_PORT:-${ARIA2RPCPORT:-8000}}"
[ -d "$etc_dir" ] || mkdir -p "$etc_dir"
[ -d "$data_dir" ] || mkdir -p "$data_dir"
[ -d "/var/log/aria2" ] || mkdir -p "/var/log/aria2"
[ -d "/data/logs/aria2" ] || mkdir -p "/data/logs/aria2"
cp -Rf "$conf_dir/." "$etc_dir/"
ln -sf "/dev/stdout" "/var/log/aria2/aria2.log"
ln -sf "/dev/stdout" "/data/logs/aria2/aria2.log"
ln -sf "$conf_dir/aria2.session" "$etc_dir/aria2.session"
if [ -f "$etc_dir/aria-ng.config.js" ]; then
rm -Rf "$get_config"

View File

@ -45,7 +45,7 @@ __update_conf_files() {
[ -d "$etc_dir" ] || mkdir -p "$etc_dir"
[ -d "$conf_dir" ] && cp -Rf "$conf_dir/." "$etc_dir/"
ln -sf "/dev/stderr" "var/log/nginx/nginx.log"
ln -sf "/dev/stdout" "/var/log/nginx/access.log"
ln -sf "/dev/stdout" "/data/logs/nginx/access.log"
if [ "$SSL_ENABLED" = "true" ]; then
__file_copy "$conf_dir/nginx.ssl.conf" "$etc_dir/nginx.conf"
__file_copy "$conf_dir/vhosts.d/default.ssl.conf" "$etc_dir/vhosts.d/default.conf"

View File

@ -1,6 +1,6 @@
# Default configuration for aria2
dir=/data/downloads/aria2
log=/var/log/aria2/aria2.log
log=/data/logs/aria2/aria2.log
input-file=/config/aria2/aria2.session
save-session=/config/aria2/aria2.session
enable-rpc=true

View File

@ -3,7 +3,7 @@ user root;
worker_processes auto;
daemon off;
error_log /var/log/nginx/nginx.log error;
error_log /data/logs/nginx/nginx.log error;
pid /var/run/nginx.pid;
events {
@ -16,7 +16,7 @@ http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
access_log /data/logs/nginx/access.log main;
sendfile on;
keepalive_timeout 65;
gzip on;