summaryrefslogtreecommitdiffstats
path: root/admin/Sources/Services/opengnsys.init
diff options
context:
space:
mode:
Diffstat (limited to 'admin/Sources/Services/opengnsys.init')
-rwxr-xr-xadmin/Sources/Services/opengnsys.init16
1 files changed, 15 insertions, 1 deletions
diff --git a/admin/Sources/Services/opengnsys.init b/admin/Sources/Services/opengnsys.init
index 2c46fc70..359a3166 100755
--- a/admin/Sources/Services/opengnsys.init
+++ b/admin/Sources/Services/opengnsys.init
@@ -40,6 +40,11 @@ REPOAUXNAME=ogAdmRepoAux
REPOAUXDAEMON=$BASEDIR/sbin/$REPOAUXNAME
REPOAUXPORT=$(awk -F= '/PUERTO/ {print $2+1}' $SERVERCFG 2>/dev/null)
############## ADV
+############# IRINA # para setBootMode desde el cliente
+SERVERAUXNAME=ogAdmServerAux
+SERVERAUXDAEMON=$BASEDIR/sbin/$SERVERAUXNAME
+SERVERAUXPORT=2011
+############# IRINA
#
# Servidor de tareas programadas
@@ -75,7 +80,12 @@ fi
# Configuración de arranque según la distribución Linux usada.
config() {
- OSDISTRIB=$(lsb_release -is 2>/dev/null)
+ if [ -f /etc/os-release ]; then
+ source /etc/os-release
+ OSDISTRIB="$NAME"
+ else
+ OSDISTRIB=$(lsb_release -is 2>/dev/null)
+ fi
case "$OSDISTRIB" in
Ubuntu|Debian|LinuxMint)
INITFUNCTIONS=/lib/lsb/init-functions
@@ -139,6 +149,10 @@ arranca_demonios() {
$ACTIONMSG "Iniciando demonio: $SERVERNAME"
$DAEMONSTART $SERVERDAEMON $EXTRAOPTS $SERVERDAEMON_OPTIONS $ENDOPTS
[ $? = 0 ] && $SUCCESSMSG || $FAILMSG
+ # Para SetBootmode desde el cliente
+ $ACTIONMSG "Iniciando demonio: $SERVERAUXNAME" #
+ faucet $SERVERAUXPORT --daemon --in bash -c "$SERVERAUXDAEMON" # NUEVO
+ [ $? = 0 ] && $SUCCESSMSG || $FAILMSG
fi
if [ $RUN_OGADMSERVER = "yes" ] && [ $RUN_OGADMREPO = "yes" ]; then
sleep 5 # Damos tiempo a que ogAdmServer este funcionando