mirror of
https://github.com/casjaysdevdocker/aria2
synced 2025-01-18 12:34:31 -05:00
🗃️ Committing everything that changed 🗃️
This commit is contained in:
parent
ee28a2cb86
commit
d86596d534
@ -104,17 +104,20 @@ if [ "$DATA_DIR_INITIALIZED" = "false" ] && [ -d "$DEFAULT_DATA_DIR/data/htdocs"
|
|||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Post copy commands
|
# Post copy commands
|
||||||
if [ -f "/config/aria2/aria-ng-f1dd57abb9.min.js" ]; then
|
if [ -f "/config/aria2/aria-ng.config.js" ]; then
|
||||||
rm -Rf "/var/www/ariang/js/aria-ng-f1dd57abb9.min.js"
|
get_config="$(ls -A /var/www/ariang/js/aria-ng-*.min.js | head -n1)"
|
||||||
ln -sf "/config/aria2/aria-ng-f1dd57abb9.min.js" "/var/www/ariang/js/aria-ng-f1dd57abb9.min.js"
|
rm -Rf "$get_config"
|
||||||
|
ln -sf "/config/aria2/aria-ng.config.js" "$get_config"
|
||||||
fi
|
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/aria2.conf" ||
|
if grep -sq "rpc-secret=*" "/config/aria2/aria2.conf"; then
|
||||||
echo "rpc-secret=$RPC_SECRET" >>"/config/aria2/aria2.conf" ||
|
sed -i "s|secret: '',|secret: ''$RPC_SECRET'',|g" "/var/www/ariang/js/aria-ng.config.js"
|
||||||
sed -i "s|rpc-secret=.*|rpc-secret=$RPC_SECRET|g" "/config/aria2/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"
|
else
|
||||||
|
echo "rpc-secret=$RPC_SECRET" >>"/config/aria2/aria2.conf"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
# Initialized
|
# Initialized
|
||||||
|
Loading…
x
Reference in New Issue
Block a user