Fix % format comma separator and empty positions.json parse error

This commit is contained in:
2026-05-04 09:19:25 -04:00
parent ba7495f4e4
commit 5826e10228
3 changed files with 24 additions and 2 deletions

19
update.sh Normal file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
# Copies updated source files to /opt/crypto-trader after a git pull.
# Usage: sudo bash update.sh
set -euo pipefail
INSTALL_DIR="/opt/crypto-trader"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [ "$(id -u)" -ne 0 ]; then
echo "ERROR: Run with sudo: sudo bash update.sh"
exit 1
fi
for item in *.py *.txt systemd; do
[ -e "$SCRIPT_DIR/$item" ] && cp -r "$SCRIPT_DIR/$item" "$INSTALL_DIR/"
done
chown -R crypto-trader:crypto-trader "$INSTALL_DIR"
echo "Updated. Run a test: sudo -u crypto-trader $INSTALL_DIR/venv/bin/python $INSTALL_DIR/bot.py"