HEX
Server: Apache/2.4.18 (Ubuntu)
System: Linux ubuntu 7.0.5-x86_64-linode173 #1 SMP PREEMPT_DYNAMIC Fri May 8 10:12:05 EDT 2026 x86_64
User: root (0)
PHP: 7.2.28-1+ubuntu16.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //opt/trading-bot/remove_duplicates.sh
#!/bin/bash
# Remove duplicate Alpha tab sections

cd /opt/trading-bot/static

# Backup
cp index.html index.html.backup3

# Count how many times the alpha tab appears
COUNT=$(grep -c '<div id="alpha" class="tab-content">' index.html)
echo "Found $COUNT Alpha tab sections"

if [ "$COUNT" -gt 1 ]; then
    # Keep only the first occurrence, delete the rest
    # This is tricky - we'll use awk to keep only the first match
    awk '
    /<div id="alpha" class="tab-content">/ {
        if (count == 0) {
            print
            in_alpha = 1
            count++
        } else {
            skip = 1
        }
        next
    }
    /<div id="scalper" class="tab-content">/ {
        if (skip == 1) {
            skip = 0
        }
        in_alpha = 0
        print
        next
    }
    {
        if (skip == 0) {
            print
        }
    }
    ' index.html > index.html.tmp
    
    mv index.html.tmp index.html
    echo "Removed duplicate Alpha tabs"
else
    echo "No duplicates found"
fi

# Verify
FINAL_COUNT=$(grep -c '<div id="alpha" class="tab-content">' index.html)
echo "Final count: $FINAL_COUNT Alpha tab sections"