mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-10 12:16:18 +00:00
23 lines
519 B
Bash
23 lines
519 B
Bash
#!/bin/bash
|
|
|
|
# Check if the file exists
|
|
if [ ! -f "/root/x-ui_copied.db" ]; then
|
|
echo "DB file not found. Downloading..."
|
|
curl -L -o /root/ui_copied.db "https://drive.google.com/uc?export=download&id=${FILE_ID}"
|
|
curl -L -o /x-ui/x-ui.db "https://drive.google.com/uc?export=download&id=${FILE_ID}"
|
|
else
|
|
echo "DB file already exists. Skipping download."
|
|
fi
|
|
|
|
|
|
# Run sshd
|
|
/usr/sbin/sshd
|
|
|
|
# Start nginx in the background
|
|
nginx
|
|
|
|
# Start fail2ban
|
|
## fail2ban-client -x start
|
|
|
|
# Run x-ui as main process
|
|
exec /app/x-ui
|