source: client/shared/etc/preinit/poweroff.sh @ d47323ec

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Last change on this file since d47323ec was c39fac3, checked in by ramon <ramongomez@…>, 13 years ago

Verión 1.0.3, #476: separar arranque de servicios en nuevo script y revisar mensajes de arranque.

git-svn-id: https://opengnsys.es/svn/branches/version1.0@2434 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100755
File size: 946 bytes
Line 
1#!/bin/bash
2#/**
3#@file    poweroff.sh
4#@brief   Script de inicio para cargar el proceso comprobación de clientes inactivos.
5#@note    Arranca y configura el proceso "cron".
6#@warning License: GNU GPLv3+
7#@version 1.0.2
8#@author  Ramon Gomez, ETSII Universidad de Sevilla
9#@date    2011-10-25
10#*/
11
12
13# Si está configurado OpenGnSys ...
14if [ -n "$OPENGNSYS" ]; then
15    echo "${MSG_POWEROFFCONF:-.}"
16
17    # Crear fichero de configuración por defecto (30 min. de espera).
18    POWEROFFCONF=/etc/poweroff.conf
19    cat << FIN > $POWEROFFCONF
20POWEROFFSLEEP=30
21POWEROFFTIME=
22FIN
23
24    # Lanzar el proceso "cron".
25    cron -l
26
27    # Definir la "crontab" lanzando el proceso de comprobación cada minuto.
28    echo "* * * * *   [ -x $OGBIN/poweroffconf ] && $OGBIN/poweroffconf" | crontab -
29
30else
31    # FIXME Error: entorno de OpenGnSys no configurado.
32    echo "Error: OpenGnSys environment is not configured."   # FIXME: definir mensaje.
33    exit 1
34fi
35
Note: See TracBrowser for help on using the repository browser.