LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-17-2014, 10:23 AM   #1
ProfWEB
LQ Newbie
 
Registered: Jan 2014
Location: Sierra Leone
Distribution: GrigoriyKxiuKM
Posts: 2

Rep: Reputation: 0
Where are command line commands stored


So say my server reboots every night. Is there a way to automate a system wide message that the server is coming down and people need to log off. I know Ive seen this on other servers. I thought there might be commands one could execute from the command line console where the server is running, but maybe not.

Anyone know how to automate a system message before a automatic server reboot takes place?

Last edited by onebuck; 01-17-2014 at 01:14 PM. Reason: If you wish to advertise then contact admin. Sig disabled, Move to Thread
 
Old 01-17-2014, 01:14 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,334

Rep: Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547Reputation: 547
Quote:
Originally Posted by ProfWEB View Post
So say my server reboots every night. Is there a way to automate a system wide message that the server is coming down and people need to log off. I know Ive seen this on other servers. I thought there might be commands one could execute from the command line console where the server is running, but maybe not.

Anyone know how to automate a system message before a automatic server reboot takes place?
You are probably using the shutdown command issued by cron. The shutdown command has the option of a time delay until reboot and issuing a warning message. Look up your automatic reboot command in one of the cron directories, likely /etc/cron.daily or some similar name. Then edit the shutdown command to what you need. See:

man shutdown

----------------------
Steve Stites
 
Old 01-25-2014, 03:00 AM   #3
patrick295767
Member
 
Registered: Feb 2006
Distribution: FreeBSD, Linux, Slackware, LFS, Gparted
Posts: 664

Rep: Reputation: 138Reputation: 138
Quote:
Originally Posted by ProfWEB View Post
So say my server reboots every night. Is there a way to automate a system wide message that the server is coming down and people need to log off. I know Ive seen this on other servers. I thought there might be commands one could execute from the command line console where the server is running, but maybe not.

Anyone know how to automate a system message before a automatic server reboot takes place?

Sure, you could use xmessage sent from crontab. There are many many ways to do so.

Also you could code an app in C and on X11 libs to show them a nice window popup. It is pretty easy to code in C or C++ with X11
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where are command line commands stored Otto-1062 Linux - General 12 03-03-2014 06:59 AM
Entering Command Line commands johnmtb Linux - Newbie 5 01-06-2009 01:26 AM
command line commands bcbotha Linux - Newbie 15 12-01-2008 08:05 AM
Java Commands for Command Line AceTech Programming 4 08-20-2006 02:55 AM
Time commands from command line ToothlessRebel Linux - Newbie 1 03-09-2005 10:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration