NgixProxy_Pathfinder/entrypoint.sh

23 lines
542 B
Bash

#!/bin/bash
# Carrega o .bashrc se existir
[ -f ~/.bashrc ] && . ~/.bashrc
# Distribui o .bashrc customizado se montado
if [ -f /opt/custom_bashrc ]; then
echo "📄 Aplicando .bashrc customizado..."
cat /opt/custom_bashrc > /root/.bashrc
cat /opt/custom_bashrc > /home/itguys/.bashrc
chown itguys:itguys /home/itguys/.bashrc
fi
# Gera chaves de host SSH se não existirem
ssh-keygen -A
# Inicia o SSH em background
/usr/sbin/sshd
# Inicia o Nginx em foreground
echo "🚀 Iniciando Nginx..."
exec nginx -g "daemon off;"