diff --git a/DockerEntrypoint.sh b/DockerEntrypoint.sh index 098490c1..6af72795 100644 --- a/DockerEntrypoint.sh +++ b/DockerEntrypoint.sh @@ -1,4 +1,14 @@ -#!/bin/sh +#!/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