ogclone-engine/ogclient/etc/preinit/default.sh

33 lines
680 B
Bash

#!/bin/bash
if grep -q pyinit=true /proc/cmdline; then
echo "python init"
exec /opt/opengnsys/etc/preinit/default.py
else
echo "shell init"
fi
# Cargar entorno de OpenGnsys
set -a
source /opt/opengnsys/etc/preinit/loadenviron.sh
# Scripts de inicio.
for f in cleanesp fileslinks loadmodules metadevs mountrepo poweroff filebeat otherservices; do
source $OGETC/preinit/$f.sh
done
unset f
if [ -f $OGETC/init/$IPV4ADDR.sh ]; then
$OGETC/init/$OG_IP.sh
elif [ -f $OGETC/init/$OGGROUP.sh ]; then
$OGETC/init/$OGGROUP.sh
elif [ -f $OGETC/init/default.sh ]; then
$OGETC/init/default.sh
else
echo "No se ha encontrado script de inicio"
halt
fi