3x-ui/DockerEntrypoint.sh
2024-08-27 08:54:02 +03:30

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