diff --git a/watch-restart.sh b/watch-restart.sh index c68a44e..8a8724a 100755 --- a/watch-restart.sh +++ b/watch-restart.sh @@ -6,10 +6,10 @@ WATCH_DIR="/home/icke/traderv4/logs" RESTART_FLAG="$WATCH_DIR/.restart-requested" -CONTAINER_NAME="trading-bot-v4" +SERVICE_NAME="trading-bot" echo "🔍 Watching for restart requests in: $WATCH_DIR" -echo "📦 Container: $CONTAINER_NAME" +echo "📦 Service: $SERVICE_NAME" echo "" # Create logs directory if it doesn't exist @@ -18,19 +18,19 @@ mkdir -p "$WATCH_DIR" while true; do if [ -f "$RESTART_FLAG" ]; then echo "🔄 Restart requested at $(cat $RESTART_FLAG)" - echo "🔄 Restarting container: $CONTAINER_NAME" + echo "🔄 Restarting service: $SERVICE_NAME" # Remove flag before restart rm "$RESTART_FLAG" - # Restart container + # Restart service using docker compose cd /home/icke/traderv4 - docker compose restart $CONTAINER_NAME + docker compose restart $SERVICE_NAME if [ $? -eq 0 ]; then - echo "✅ Container restarted successfully" + echo "✅ Service restarted successfully" else - echo "❌ Failed to restart container" + echo "❌ Failed to restart service" fi echo "" fi