🗃️ Committing everything that changed 🗃️

applications/
configs/
lists/
wwwroot/
This commit is contained in:
casjay
2023-08-22 17:53:03 -04:00
parent 13eaf166f5
commit 5eb3ff1598
265 changed files with 48486 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
EXEC_CMD_BIN="aria2c" # command to execute
EXEC_CMD_ARGS="--conf-path=$ETC_DIR/aria2.conf" # command arguments
#
RPC_SECRET="${RPC_SECRET:-}"
GET_WEB_CONFIG="$(find "$WWW_DIR/js" -name 'aria-ng*.js' | grep -v '^$')"
[ -n "$RPC_SECRET" ] && RPC_SECRET_BASE64=$(echo -n "${RPC_SECRET}" | base64 -w 0)
#
__replace "6800" "$SERVICE_PORT" $GET_WEB_CONFIG
__replace "REPLACE_RPC_PORT" "$SERVICE_PORT" "$ETC_DIR/aria2.conf"
# replace variables recursively
# __find_replace "" "" "$CONF_DIR/"
if grep -qs "REPLACE_RPC_SECRET" "$GET_WEB_CONFIG"; then
__find_replace "REPLACE_RPC_SECRET" "$RPC_SECRET_BASE64" "$GET_WEB_CONFIG"
else
sed -i 's,secret:"[^"]*",secret:"'"${RPC_SECRET_BASE64}"'",g' "$GET_WEB_CONFIG"
fi
if [ -n "$RPC_SECRET" ]; then
echo "Changing rpc secret to $RPC_SECRET"
if grep -sq "rpc-secret=" "$ETC_DIR/aria2.conf"; then
__replace "REPLACE_RPC_SECRET" "$RPC_SECRET" "$ETC_DIR/aria2.conf"
else
echo "rpc-secret=$RPC_SECRET" >>"$ETC_DIR/aria2.conf"
fi
else
__replace "rpc-secret=" "#rpc-secret=" "$ETC_DIR/aria2.conf"
fi
# custom commands
touch "$CONF_DIR/aria2.session"
ln -sf "$CONF_DIR/aria2.session" "$ETC_DIR/aria2.session"

View File

@@ -0,0 +1 @@
curl -q -LSsf https://api.github.com/repos/mayswind/AriaNg/releases/latest | grep 'browser_download_url' | grep '[0-9]\.zip' | sed 's|^.* ||g;s|"||g'

View File

@@ -0,0 +1 @@
aria2 unzip nginx