diff --git a/install.sh b/install.sh index 591fa93..89e133a 100644 --- a/install.sh +++ b/install.sh @@ -64,8 +64,10 @@ function set_telegram_credentials() { function clone_and_build() { if [ -d "$CLONE_DIR" ]; then - echo -e "${RED}⚠️ Folder '$CLONE_DIR' already exists. Please remove or rename it first.${NC}" - return + echo -e "${RED}⚠️ Folder '$CLONE_DIR' already exists.${NC}" + read -rp "$(echo -e "${YELLOW}🔁 Do you want me to remove it? Press Enter to continue, or Ctrl+C to cancel...${NC}")" + rm -rf "$CLONE_DIR" + echo -e "${GREEN}✅ Removed old '$CLONE_DIR' folder.${NC}" fi echo -e "${GREEN}📥 Cloning repo...${NC}" @@ -77,6 +79,7 @@ function clone_and_build() { set_telegram_credentials } + function enable_logging() { cd "$CLONE_DIR" || exit 1 sed -i '1s|^|exec > >(tee -a /app/bot.log) 2>&1\n|' bot.py