Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatically reboot init 6 1

Status
Not open for further replies.

nwo4life

Technical User
May 16, 2002
23
0
0
US
Is there a way to issue a init 6 & email someone when the system is up? I want to do this thru cron at a certain time.

Thanks in Advance.
 
Hi,

What you could do, create script that will email somebody and put the script in rc3.d folder. That is the default boot level. Everytime your system reboot it will send an email.



regards,
feroz
 
I need the machine to reboot from cron at like 500 pm every sunday.
 
Hi,

crontab -e (as root)

00 17 * * 0 /admin/reboot_script

save it. Within reboot_script just put:

/usr/sbin/shutdown -y -g0 -i6.

Change permission to -rwx------ ONLY by owner (root). chmod 700 reboot_script.

And dont forget to create your email script and put in /etc/rc3.d directory.

regards,
feroz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top