#!/bin/bash

# 환경변수 적용
source /etc/profile && sleep 5

# SSH 서버 시작
/usr/sbin/sshd -D & sleep 5

# php-fpm (Nginx 전에 시작)
service php7.4-fpm start && sleep 5

# nginx
ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled
ln -s /etc/nginx/sites-available/nextcloud.conf /etc/nginx/sites-enabled
service nginx start && sleep 5

# mariadb
service mysql start && sleep 5

# 3dp project
/data/webapps/swmb3d/start_service.sh start && sleep 5

# flask api
/home/gds/printer/venv/bin/python /home/gds/printer/app.py && sleep 5

# slicer install
cd /home/gds/printer


# Service 재시작 시 Docker가 종료되지 않도록 대기
tail -f /dev/null
