-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
31 lines (24 loc) · 735 Bytes
/
Copy pathrun.sh
File metadata and controls
31 lines (24 loc) · 735 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
#!/bin/bash
# Define file paths
URLS_FILE="urls.txt"
FETCH_SCRIPT="fetch_urls.sh"
LOG_FILE="script.log"
# Checking urls.txt file exists
if [ ! -f "$URLS_FILE" ]; then
echo "Error: $URLS_FILE not found! Please create the file with URLs." | tee -a "$LOG_FILE"
exit 1
fi
if [ ! -f "$FETCH_SCRIPT" ]; then
echo "Error: $FETCH_SCRIPT not found!" | tee -a "$LOG_FILE"
exit 1
fi
> "$LOG_FILE"
echo "Starting the Website IP Scraper..." | tee -a "$LOG_FILE"
chmod +x "$FETCH_SCRIPT"
# Run the fetch_urls.sh script
{
echo "Running fetch_urls.sh..."
./$FETCH_SCRIPT
echo "Process completed."
} 2>&1 | tee -a "$LOG_FILE"
echo "IP address resolution completed. Check $LOG_FILE for details." | tee -a "$LOG_FILE"