Sponsored Content
Full Discussion: Server Reboot Alert
Top Forums Shell Programming and Scripting Server Reboot Alert Post 68947 by RTM on Friday 8th of April 2005 06:23:49 PM
Old 04-08-2005
Using cron would be difficult since it runs jobs on a schedule - reboots don't normally happen that way.

Put a startup script which emails you when the server reboots. Since you didn't post what OS or version you are running, I can't give you specifics of where the script should go (For Solaris in /etc/rc2.d or /etc/rc3.d would be a good place).
You would want it to start after the network is up and running so putting it as S99some-name should work (again, it matters on what your OS is).

Create S99serverup in /etc/rc2.d would send a email to your address at your domain with the hostname and reboot as subject. No internal message but you can change that with information placed into another file if needed.

#!/bin/sh
/bin/mailx -s"`hostname` reboot" youremail@yourdomain.xxx < /dev/null
exit
 

9 More Discussions You Might Find Interesting

1. SCO

Reboot the sco server

Dear sir, I am using sco open server 5.06.How we can reboot the system without using root password? Whar are the permision need to change to do this. Thanks, Mostafizur Rahman (3 Replies)
Discussion started by: rahmanm
3 Replies

2. UNIX for Advanced & Expert Users

server reboot

hi all, :) for a reboot of sun box for patch installation i would like to know where do the reboot logs apart from /var/adm/messages and patch run messages would be available, i would like to know the sequence of messages logged in the file like requesting the users to log out sending a... (1 Reply)
Discussion started by: matrixmadhan
1 Replies

3. AIX

IP setting changes after server reboot

I've recently changed my gateway setting using SMIT. Everything went fine except that the gateway setting kept reverting back to the old one everytime I reboot the server. I'm on AIX 5.2 running p-Series. Thanks for any info. (3 Replies)
Discussion started by: dereklow
3 Replies

4. Solaris

Reboot the server through console

Hi All, I want to know the procedure like if server is down, i want to reboot the server through console ($rsc or $sc prompt).Could you please help me out. I would really appreciate your cooperation. thanks for understanding regards krishna (5 Replies)
Discussion started by: murthy76
5 Replies

5. Solaris

server reboot itself but no core dump

I wonder if anyone here came accross the same situation like me. One of server in my company reboot itself serveral days ago. I have checked /var/adm/messages... there is nothing there but a few messages mention explorer file has been generated by sysadmin. There is no core dump file either.... (4 Replies)
Discussion started by: uuontario
4 Replies

6. Solaris

Change gateway without reboot server

Hi Gurus Recently i had change the gateway for a server i had change the IP in the /etc/defaultrouter and run the below command # route add default 10.86.33.222 # route delete default 10.86.33.1 # netstat -rn Routing Table: IPv4 Destination Gateway Flags Ref ... (2 Replies)
Discussion started by: SmartAntz
2 Replies

7. Linux

Linux server reboot

We reboot our linux servers daily. Is it needed ? (10 Replies)
Discussion started by: linuxadmin
10 Replies

8. Solaris

Validate mountpoints on solaris server after server reboot

Hi, anyone please let us know how to write shell script to find the missing mountpoints after server reboot. i want to take the mountpount information before server reboot, and validate the mountpoints after server reboot if any missing.please let us know the shell script from begining to end as... (24 Replies)
Discussion started by: VenkatReddy786
24 Replies

9. Red Hat

Server reboot

Hi, The server got rebooted and below messages can be seen in /var/log/messages Sep 7 10:49:12 minersville kernel: Call Trace: <IRQ> <ffffffff80167420>{__alloc_pages+796} Sep 7 10:49:12 minersville kernel: <ffffffff80182814>{kmem_getpages+106} <ffffffff80183c16>{fallback_alloc+304}... (3 Replies)
Discussion started by: admin_db
3 Replies
LDAP2REPOSITORY(1)					User Contributed Perl Documentation					LDAP2REPOSITORY(1)

NAME
ldap2repository - creating debian repositories cronjob for the GOsa FAI plugin. SYNOPSIS
ldap2repository [-hvnpej] [-c config] [-d outdir] [-r srvroot] [-i interface] [-a arch] [-P proxy] DESCRIPTION
ldap2repository is a script to create the cronjob for the local. debian repositories needed by GOsa FAI plugin. -c LDAP config file (default: /etc/ldap/ldap.conf) -d output dir (default: /etc/gosa/fai) -h display this help and exit -n skip cleanup for mirrors -p show progress in cronjob -v be verbose -i network interface (default: eth0) -j create a new /etc/cron.d/goto-fai-backend -r server root (default: /srv/www) -e ignore small errors -a processor architecture (default: i386) -P proxy (default: none) BUGS
Please report any bugs, or post any suggestions, to the GOsa mailing list <gosa-devel@oss.gonicus.de> or to <https://oss.gonicus.de/labs/gosa> LICENCE AND COPYRIGHT
This code is part of GOsa (<http://www.gosa-project.org>) Copyright (C) 2005-2006 Jan-Marek Glogowski <glogow@fbihome.de> 2007-2010 The GOsa project <gosa-devel@oss.gonicus.de> This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. perl v5.10.0 2010-05-19 LDAP2REPOSITORY(1)
All times are GMT -4. The time now is 07:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy