-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_legacy.sh
More file actions
executable file
·42 lines (33 loc) · 900 Bytes
/
Copy pathrun_legacy.sh
File metadata and controls
executable file
·42 lines (33 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# OSM Ad Bot — Legacy Single-Tab Mode
# Usage: ./run_legacy.sh <path-to-storage-dump>
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [ -z "$1" ]; then
echo "Usage: $0 <path-to-storage-dump>"
exit 1
fi
DUMP_DIR="$1"
LOG="/tmp/osm_ad_bot_legacy.log"
echo "=== OSM Ad Bot (Legacy Single-Tab) ==="
echo "Dump dir : ${DUMP_DIR}"
echo "Log file : ${LOG}"
echo "Mode : headless, 1 tab, continuous loop"
echo ""
if [ ! -d "${DUMP_DIR}" ]; then
echo "ERROR: Dump directory not found: ${DUMP_DIR}"
exit 1
fi
cd "${SCRIPT_DIR}"
python3 osm_ad_bot.py \
--dump "${DUMP_DIR}" \
--headless \
--tabs 1 \
--ad-duration 120 \
--log "${LOG}" &
PID=$!
echo "Started with PID: ${PID}"
echo "PID ${PID}" > /tmp/osm_ad_bot_legacy.pid
echo ""
echo "Follow logs: tail -f ${LOG}"
echo "Stop: kill $(cat /tmp/osm_ad_bot_legacy.pid)"