Fix install.sh: copy .git directory for update support via git pull

Changed cp -r ./* to cp -a . so hidden files (.git) are included
when copying to the install directory. Without this, git pull fails
in /opt/netbird-msp because it's not a git repository.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-08 20:21:33 +01:00
parent 835f3ed40e
commit 55e2c3b80b

View File

@@ -355,9 +355,9 @@ ENVEOF
chmod 600 "$INSTALL_DIR/.env" chmod 600 "$INSTALL_DIR/.env"
echo -e "${GREEN}✓ Container environment created${NC}" echo -e "${GREEN}✓ Container environment created${NC}"
# Copy application files # Copy application files (including .git for updates via git pull)
echo "Copying application files..." echo "Copying application files..."
cp -r ./* "$INSTALL_DIR/" 2>/dev/null || true cp -a . "$INSTALL_DIR/" 2>/dev/null || true
cd "$INSTALL_DIR" cd "$INSTALL_DIR"
echo -e "${GREEN}✓ Files copied to $INSTALL_DIR${NC}" echo -e "${GREEN}✓ Files copied to $INSTALL_DIR${NC}"