Update install.sh
This commit is contained in:
16
install.sh
16
install.sh
@@ -43,13 +43,13 @@ function system_status() {
|
||||
echo -e "${YELLOW}Exists${NC}"
|
||||
folder_status="exists"
|
||||
else
|
||||
echo -e "${GREEN}Not present${NC}"
|
||||
echo -e "${RED}Not present${NC}"
|
||||
folder_status="missing"
|
||||
fi
|
||||
|
||||
echo -n "📦 Docker image '$CRON_NAME': "
|
||||
if docker images --format '{{.Repository}}' | grep -q "$CRON_NAME"; then
|
||||
echo -e "${YELLOW}Already built${NC}"
|
||||
echo -e "${GREEN}Already built${NC}"
|
||||
image_status="built"
|
||||
else
|
||||
echo -e "${RED}Not built${NC}"
|
||||
@@ -57,12 +57,10 @@ function system_status() {
|
||||
fi
|
||||
|
||||
echo -n "📦 Docker container '$CRON_NAME': "
|
||||
if docker ps -a --format '{{.Names}}' | grep -q "^$CRON_NAME$"; then
|
||||
echo -e "${RED}Not running${NC}"
|
||||
container_status="exists"
|
||||
if docker ps --format '{{.Names}}' | grep -q "^$CRON_NAME$"; then
|
||||
echo -e "${GREEN}Running${NC}"
|
||||
else
|
||||
echo -e "${GREEN}Not running${NC}"
|
||||
container_status="missing"
|
||||
echo -e "${YELLOW}Not running (may be normal if run with --rm)${NC}"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -106,7 +104,8 @@ function clone_and_build() {
|
||||
|
||||
echo -e "${GREEN}📥 Cloning repo...${NC}"
|
||||
git clone "$REPO_URL" "$CLONE_DIR"
|
||||
cd "$CLONE_DIR" || exit 1
|
||||
|
||||
pushd "$CLONE_DIR" > /dev/null
|
||||
echo -e "${GREEN}🔧 Building Docker image...${NC}"
|
||||
docker compose build
|
||||
|
||||
@@ -141,6 +140,7 @@ function clone_and_build() {
|
||||
-d parse_mode="HTML" > /dev/null
|
||||
echo -e "${GREEN}✅ Test message sent. Check your Telegram!${NC}"
|
||||
|
||||
popd > /dev/null
|
||||
read -rp "$(echo -e "${GREEN}🔁 Press Enter to return to the main menu...${NC}")"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user