From a57a8606b296de71c6a780bf541271b895b845e0 Mon Sep 17 00:00:00 2001 From: OnceUponATimeInAmerica <114700833+OnceUponATimeInAmerica@users.noreply.github.com> Date: Tue, 27 Aug 2024 08:54:02 +0330 Subject: [PATCH] Update DockerEntrypoint.sh (test2) --- DockerEntrypoint.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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