2024-08-27 05:24:02 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Check if the file exists
|
|
|
|
if [ ! -f "/root/x-ui_copied.db" ]; then
|
|
|
|
echo "DB file not found. Downloading..."
|
2024-08-27 05:29:20 +00:00
|
|
|
curl -L -o /root/x-ui_copied.db "https://drive.google.com/uc?export=download&id=${FILE_ID}"
|
|
|
|
curl -L -o /etc/x-ui/x-ui.db "https://drive.google.com/uc?export=download&id=${FILE_ID}"
|
2024-08-27 05:24:02 +00:00
|
|
|
else
|
|
|
|
echo "DB file already exists. Skipping download."
|
|
|
|
fi
|
|
|
|
|
2023-07-01 12:26:43 +00:00
|
|
|
|
2024-08-27 00:56:55 +00:00
|
|
|
# Run sshd
|
|
|
|
/usr/sbin/sshd
|
|
|
|
|
2024-08-25 09:44:51 +00:00
|
|
|
# Start nginx in the background
|
|
|
|
nginx
|
|
|
|
|
2023-07-01 12:26:43 +00:00
|
|
|
# Start fail2ban
|
2024-08-25 13:40:21 +00:00
|
|
|
## fail2ban-client -x start
|
2023-07-01 12:26:43 +00:00
|
|
|
|
2024-08-27 00:56:55 +00:00
|
|
|
# Run x-ui as main process
|
2023-07-01 12:26:43 +00:00
|
|
|
exec /app/x-ui
|