Update install.sh
This commit is contained in:
17
install.sh
17
install.sh
@@ -125,8 +125,21 @@ function clone_and_build() {
|
||||
read -rp "$(echo -e "${GREEN}🔁 Press Enter to return to the main menu...${NC}")"
|
||||
}
|
||||
|
||||
# All other functions (system_status, enable_logging, setup_cronjob, show_cronjobs, remove_cronjob, run_bot_once)
|
||||
# remain unchanged and are already defined above.
|
||||
function run_bot_once() {
|
||||
echo -e "${YELLOW}🔍 Checking bot status...${NC}"
|
||||
if [ ! -f "$CLONE_DIR/bot.py" ]; then
|
||||
echo -e "${RED}❌ Bot not installed. Please run option 1 first.${NC}"
|
||||
else
|
||||
echo -e "${GREEN}📤 Running the bot in Docker to send test message...${NC}"
|
||||
docker compose -f "$CLONE_DIR/docker-compose.yml" run --rm "$CRON_NAME"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo -e "${GREEN}✅ Bot ran successfully. Check your Telegram!${NC}"
|
||||
else
|
||||
echo -e "${RED}❌ Bot failed to run. Check Docker logs or credentials.${NC}"
|
||||
fi
|
||||
fi
|
||||
read -rp "$(echo -e "${GREEN}🔁 Press Enter to return to the main menu...${NC}")"
|
||||
}
|
||||
|
||||
# -- Start script loop --
|
||||
while true; do
|
||||
|
||||
Reference in New Issue
Block a user