#!/bin/bash echo "구마모토 지도 서버 시작 중..." # PostgreSQL 시작 service postgresql start # 데이터베이스가 없으면 초기 설정 실행 if ! sudo -u postgres psql -lqt | cut -d \| -f 1 | grep -qw kumamoto_map; then echo "초기 데이터베이스 설정 실행 중..." /opt/map-server/download-kumamoto-data.sh echo "타일 생성 중..." python3 /opt/map-server/setup-tiles.py else echo "기존 데이터베이스 사용" fi # Apache 모듈 활성화 a2enmod rewrite a2enmod headers a2enmod expires # Apache 시작 echo "Apache 웹서버 시작..." apache2ctl -D FOREGROUND