diff options
-rwxr-xr-x | admin/Sources/Services/opengnsys.init | 14 | ||||
-rwxr-xr-x | installer/opengnsys_installer.sh | 5 | ||||
-rwxr-xr-x | installer/opengnsys_uninstall.sh | 1 | ||||
-rwxr-xr-x | repoman/bin/opengnsys.cron | 4 |
4 files changed, 14 insertions, 10 deletions
diff --git a/admin/Sources/Services/opengnsys.init b/admin/Sources/Services/opengnsys.init index 2125e187..863184f9 100755 --- a/admin/Sources/Services/opengnsys.init +++ b/admin/Sources/Services/opengnsys.init @@ -88,14 +88,14 @@ config() { SUCCESSMSG="log_end_msg 0" FAILMSG="log_end_msg 1" ;; - Fedora) + CentOS|Fedora) INITFUNCTIONS=/etc/init.d/functions DAEMONSTART="daemon" - EXTRAOPTS="" + ENDOPTS="&" DAEMONSTOP="killproc" ACTIONMSG="echo -n" - SUCCESSMSG="( success; echo )" - FAILMSG="( failure; echo )" + SUCCESSMSG="eval ( success; echo )" + FAILMSG="eval ( failure; echo )" ;; *) echo "Distribución Linux desconcocida o no soportada." exit ;; @@ -127,7 +127,7 @@ arranca_demonios() { if [ $RUN_OGADMSERVER = "yes" ] then $ACTIONMSG "Iniciando demonio: $SERVERNAME" - $DAEMONSTART $SERVERDAEMON $EXTRAOPTS $SERVERDAEMON_OPTIONS + $DAEMONSTART $SERVERDAEMON $EXTRAOPTS $SERVERDAEMON_OPTIONS $ENDOPTS [ $? = 0 ] && $SUCCESSMSG || $FAILMSG fi if [ $RUN_OGADMSERVER = "yes" ] && [ $RUN_OGADMREPO = "yes" ] @@ -137,7 +137,7 @@ arranca_demonios() { if [ $RUN_OGADMREPO = "yes" ] then $ACTIONMSG "Iniciando demonio: $REPONAME" - $DAEMONSTART $REPODAEMON $EXTRAOPTS $REPODAEMON_OPTIONS + $DAEMONSTART $REPODAEMON $EXTRAOPTS $REPODAEMON_OPTIONS $ENDOPTS [ $? = 0 ] && $SUCCESSMSG || $FAILMSG ############ ADV $ACTIONMSG "Iniciando demonio: $REPOAUXNAME" @@ -148,7 +148,7 @@ arranca_demonios() { if [ $RUN_OGADMAGENT = "yes" ] then $ACTIONMSG "Iniciando demonio: $AGENTNAME" - $DAEMONSTART $AGENTDAEMON $EXTRAOPTS $AGENTDAEMON_OPTIONS + $DAEMONSTART $AGENTDAEMON $EXTRAOPTS $AGENTDAEMON_OPTIONS $ENDOPTS [ $? = 0 ] && $SUCCESSMSG || $FAILMSG fi if [ $RUN_BTTRACKER = "yes" ] diff --git a/installer/opengnsys_installer.sh b/installer/opengnsys_installer.sh index 5b86cfd6..6dd5405a 100755 --- a/installer/opengnsys_installer.sh +++ b/installer/opengnsys_installer.sh @@ -66,6 +66,7 @@ OPENGNSYS_DB_CREATION_FILE=opengnsys/admin/Database/ogAdmBD.sql # - APACHEINIT, APACHECFGDIR, APACHEUSER, APACHEGROUP - arranque y configuración de Apache # - APACHEENABLESSL, APACHEMAKECERT - habilitar módulo Apache y certificado SSL # - APACHEENABLEOG, APACHESITESDIR - habilitar sitio web de OpenGnSys +# - INETDINIT - arranque del metaservicio Inetd # - DHCPINIT, DHCPCFGDIR - arranque y configuración de DHCP # - MYSQLINIT - arranque de MySQL # - SAMBAINIT, SAMBACFGDIR - arranque y configuración de Samba @@ -93,6 +94,7 @@ case "$OSDISTRIB" in APACHEMAKECERT="make-ssl-cert generate-default-snakeoil --force-overwrite" DHCPINIT=/etc/init.d/isc-dhcp-server DHCPCFGDIR=/etc/dhcp + INETDINIT=/etc/init.d/openbsd-inetd MYSQLINIT=/etc/init.d/mysql SAMBAINIT=/etc/init.d/smbd SAMBACFGDIR=/etc/samba @@ -111,6 +113,7 @@ case "$OSDISTRIB" in APACHEGROUP="apache" DHCPINIT=/etc/init.d/dhcpd DHCPCFGDIR=/etc/dhcp + INETDINIT=/etc/init.d/xinetd MYSQLINIT=/etc/init.d/mysqld SAMBAINIT=/etc/init.d/smb SAMBACFGDIR=/etc/samba @@ -676,7 +679,7 @@ function tftpConfigure() { echoAndLog "${FUNCNAME}(): Configuring TFTP service." # reiniciamos demonio internet ????? porque ???? - /etc/init.d/openbsd-inetd start + $INETDINIT start # preparacion contenedor tftpboot cp -a /usr/lib/syslinux/ $TFTPCFGDIR/syslinux diff --git a/installer/opengnsys_uninstall.sh b/installer/opengnsys_uninstall.sh index f9b5ce0e..3ba22c7f 100755 --- a/installer/opengnsys_uninstall.sh +++ b/installer/opengnsys_uninstall.sh @@ -50,6 +50,7 @@ for dir in $OPENGNSYS/*; do fi done rm -f /etc/init.d/opengnsys /etc/default/opengnsys /var/log/opengnsys +rm -f /etc/cron.d/{opengnsys,torrentcreator,torrenttracker} # Comentar recursos de OpenGnSys en Samba. perl -pi -e "s/^ *include \= \/etc\/samba\/smb-og.conf/\; include \= \/etc\/samba\/smb-og.conf/" /etc/samba/smb.conf /etc/init.d/smbd restart diff --git a/repoman/bin/opengnsys.cron b/repoman/bin/opengnsys.cron index 55022ef1..db517fbd 100755 --- a/repoman/bin/opengnsys.cron +++ b/repoman/bin/opengnsys.cron @@ -8,11 +8,11 @@ DEFAULTFILE=/etc/default/opengnsys [ -f $DEFAULTFILE ] && source $DEFAULTFILE # Si un servicio debe estar activo y no se está ejecutando, reiniciar OpenGnSys. -if [ "$RUN_OGADMSERVER" == "yes" -a $(pgrep -c ogAdmServer) == 0 ]; then +if [ "$RUN_OGADMSERVER" == "yes" -a $(pgrep ogAdmServer | wc -w) == 0 ]; then date +"%d/%m/%Y %T ERROR: El servicio ogAdmServer estaba caido, se reinicia" >> $LOGDIR/ogAdmServer.log /etc/init.d/opengnsys restart fi -if [ "$RUN_OGADMREPO" == "yes" -a $(pgrep -c ogAdmRepo) == 0 ]; then +if [ "$RUN_OGADMREPO" == "yes" -a $(pgrep ogAdmRepo | wc -w) == 0 ]; then date +"%d/%m/%Y %T ERROR: El servicio ogAdmRepo estaba caido, se reinicia" >> $LOGDIR/ogAdmRepo.log /etc/init.d/opengnsys restart fi |