Apagado automatico del Servidor - URGENTE

BOLT

Lanero Regular
22 Sep 2005
11
Hola!!!

Quisiera que me guien por favor, es que soy nuevo en este tema.
Necesito realizar un "Apagado Automatico al Servidor" en un horario establecido. Dicho servidor solo cumple la función de Router para internet (restricciones y permisos) esta en White Box Enterprise Linux 4.

Desde ya muhas gracias...
 
Buenas a todos...

Estuve investigando y he llegado hasta aqui. Espero contar con sus ayudas para solucionarlo.

Realice lo siguiente:
1º- Prepare el "script" asi:
[root@servidor ~]# vi apagar.sh

2º- Dentro del vi escribi:
#!/bin/bash

shutdown -h now

3º- Le di permiso de ejecucion asi:
[root@servidor ~]# chmod 755 apagar.sh

4º- Para probar le di:
[root@servidor ~]# ./apagar.sh
Y apago correctamente.

Para el "crontab -e", realice lo siguiente:
1º- [root@servidor ~]# crontab -e
Y dentro escribi:
#!/bin/bash
0 19 * * * /root/apagar.sh

2º- Probe, pero NO funciono!!

-Ya he verificado la redireccion y esta ok. Aparte he cambiado de horario y ni aun.

Cual es el problema?

Saludos....

 
Ok, espero seguir contando con tu ayuda. Desde ya muchas gracias....

En ps -fea, el contenido es:

[root@servidor ~]# ps -fea
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 07:13 ? 00:00:00 init [5]
root 2 1 0 07:13 ? 00:00:00 [ksoftirqd/0]
root 3 1 0 07:13 ? 00:00:00 [events/0]
root 4 3 0 07:13 ? 00:00:00 [khelper]
root 5 3 0 07:13 ? 00:00:00 [kacpid]
root 20 3 0 07:13 ? 00:00:00 [kblockd/0]
root 30 3 0 07:13 ? 00:00:00 [pdflush]
root 31 3 0 07:13 ? 00:00:00 [pdflush]
root 33 3 0 07:13 ? 00:00:00 [aio/0]
root 21 1 0 07:13 ? 00:00:00 [khubd]
root 32 1 0 07:13 ? 00:00:00 [kswapd0]
root 107 1 0 07:13 ? 00:00:00 [kseriod]

root 183 3 0 07:13 ? 00:00:00 [kmirrord/0]
root 192 1 0 07:13 ? 00:00:01 [kjournald]
root 1040 1 0 07:13 ? 00:00:00 udevd
root 1918 1 0 07:14 ? 00:00:00 syslogd -m 0
root 1922 1 0 07:14 ? 00:00:00 klogd -x
rpc 1943 1 0 07:14 ? 00:00:00 portmap
rpcuser 1963 1 0 07:14 ? 00:00:00 rpc.statd
root 1997 1 0 07:14 ? 00:00:00 rpc.idmapd
root 2059 1 0 07:14 ? 00:00:00 /usr/sbin/smartd
root 2069 1 0 07:14 ? 00:00:00 /usr/sbin/acpid
root 2081 1 0 07:14 ? 00:00:00 cupsd
root 2117 1 0 07:14 ? 00:00:00 /usr/sbin/sshd
root 2132 1 0 07:14 ? 00:00:00 xinetd -stayalive -pidfile /var/root 2142 1 0 07:14 ? 00:00:00 gpm -m /dev/input/mice -t imps2
xfs 2178 1 0 07:14 ? 00:00:00 xfs -droppriv -daemon
daemon 2197 1 0 07:14 ? 00:00:00 /usr/sbin/atd
dbus 2216 1 0 07:14 ? 00:00:00 dbus-daemon-1 --system
root 2226 1 0 07:14 ? 00:00:00 cups-config-daemon
root 2237 1 0 07:14 ? 00:00:01 hald
root 2254 1 0 07:14 ? 00:00:00 /usr/local/squid/sbin/squid
squid 2256 2254 0 07:14 ? 00:02:02 (squid)
squid 2370 2256 0 07:14 ? 00:00:00 (unlinkd)
root 2383 1 0 07:14 ? 00:00:00 /usr/bin/perl /usr/libexec/webmiroot 2389 1 0 07:14 tty1 00:00:00 /sbin/mingetty tty1
root 2414 1 0 07:14 tty2 00:00:00 /sbin/mingetty tty2
root 2491 1 0 07:14 tty3 00:00:00 /sbin/mingetty tty3
root 2508 1 0 07:14 tty4 00:00:00 /sbin/mingetty tty4
root 2553 1 0 07:14 tty5 00:00:00 /sbin/mingetty tty5
root 2570 1 0 07:14 tty6 00:00:00 /sbin/mingetty tty6
root 2571 1 0 07:14 ? 00:00:00 /usr/bin/gdm-binary -nodaemon
root 2819 2571 0 07:15 ? 00:00:00 /usr/bin/gdm-binary -nodaemon
root 2824 2819 1 07:15 ? 00:09:48 /usr/X11R6/bin/X :0 -audit 0 -auroot 2893 2819 0 07:15 ? 00:00:01 /usr/bin/gnome-session
root 2921 1 0 07:15 ? 00:00:00 /usr/bin/ssh-agent -s
root 2954 1 0 07:15 ? 00:00:00 /usr/bin/dbus-launch --exit-withroot 2955 1 0 07:15 ? 00:00:00 dbus-daemon-1 --fork --print-pidroot 2959 1 0 07:15 ? 00:00:01 /usr/libexec/gconfd-2 5
root 2962 1 0 07:15 ? 00:00:00 /usr/bin/gnome-keyring-daemon
root 2964 1 0 07:15 ? 00:00:00 /usr/libexec/bonobo-activation-sroot 2966 1 0 07:15 ? 00:00:01 /usr/libexec/gnome-settings-daemroot 2972 1 0 07:15 ? 00:00:01 /usr/libexec/gam_server
root 3004 1 0 07:15 ? 00:00:30 /usr/bin/metacity --sm-client-idroot 3008 1 0 07:15 ? 00:00:12 gnome-panel --sm-client-id defauroot 3010 1 0 07:15 ? 00:00:53 nautilus --no-default-window --sroot 3012 1 0 07:15 ? 00:00:00 gnome-volume-manager --sm-clientroot 3015 1 0 07:15 ? 00:00:01 eggcups --sm-client-id default5
root 3017 1 0 07:15 ? 00:00:00 pam-panel-icon --sm-client-id deroot 3020 3017 0 07:15 ? 00:00:00 /sbin/pam_timestamp_check -d rooroot 3025 1 0 07:15 ? 00:00:00 /usr/libexec/gnome-vfs-daemon --root 3031 1 0 07:15 ? 00:00:31 /usr/libexec/wnck-applet --oaf-aroot 3033 1 0 07:15 ? 00:00:00 /usr/libexec/mapping-daemon
root 3037 1 0 07:15 ? 00:00:01 /usr/libexec/mixer_applet2 --oafroot 3039 1 0 07:15 ? 00:00:02 /usr/libexec/clock-applet --oaf-root 3041 1 0 07:15 ? 00:00:00 /usr/libexec/notification-area-aroot 3044 1 0 07:15 ? 00:00:00 /usr/libexec/evolution-data-servroot 4005 1 0 11:44 ? 00:00:00 /bin/sh /usr/lib/firefox-1.0.3/froot 4053 4005 0 11:44 ? 00:00:00 /bin/sh /usr/lib/firefox-1.0.3/rroot 4058 4053 2 11:44 ? 00:06:24 /usr/lib/firefox-1.0.3/firefox-broot 4112 4058 0 11:45 ? 00:00:00 [netstat] <defunct>
root 4375 1 0 13:15 ? 00:00:43 gaim
root 5395 4058 0 14:02 ? 00:00:00 java_vm
root 5425 5395 0 14:03 ? 00:00:00 [gtkhelper] <defunct>
root 5735 1 0 15:29 ? 00:00:00 /usr/libexec/evolution/2.0/evoluroot 5838 1 5 15:32 ? 00:00:00 gnome-terminal
root 5839 5838 0 15:32 ? 00:00:00 gnome-pty-helper
root 5840 5838 0 15:32 pts/1 00:00:00 bash
root 5857 5840 0 15:32 pts/1 00:00:00 ps -fea

Y, en /etc/crontab, esta esto:

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.dialy
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

Saludos....
 
Buenas a todos!!!!

Les comento que logre solucionar, para realizar el Apagado Automatico del Servidor.

Gracias a todos por sus ayudas....

Saludos.....

BOLT
 
offtopic antes de cerrar el foro... con respecto a su solucion... pienso que muchos usuarios se preguntaran.. aja y como le hizo.. y como quedo?.. bueno lo dejamos el tema abierto por si a alguno quiere preguntarle algo a BOLT sobre la solucion delproblema.. antes de cerrarlo!! salu2!!
 

Los últimos temas