LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-28-2015, 01:51 AM   #1
manoj_aceic
LQ Newbie
 
Registered: Aug 2015
Posts: 3

Rep: Reputation: Disabled
want to shutdown my Rhel server after 30 min if there is no logged in.


Hi
i want to shutdown my RHEL server after 30 min if there is no logged in to that server.

how to i do that.
 
Old 08-28-2015, 02:15 AM   #2
hsaltiel
LQ Newbie
 
Registered: Aug 2015
Location: Buenos Aires, Argentina
Distribution: Manjaro, OpenIndiana
Posts: 3

Rep: Reputation: Disabled
Hi!
Ii can imagine this as a situation where you want the server to go down in case nobody is logged (even using the console, right?) for 30 minutes, right?
Maybe the easiest way is to create a script with this logic:

1 - How many people are logged into the system? If "0", I write a file somewhere.
2 - 30 minutesafter that, I check again if there is somebody logged into the system.
3 - If nobody, and the file exists, the poweroff the server.
4 - If anybody is logged, the file is deleted, and we wait for 30 minutes.

Item 1 is a simple script.
Item 2 is triggered by crontab.
Item 3 is the script from 1.
Item 4 too.

My 2 cents!
Best regards,

HeCSa.
 
Old 08-28-2015, 02:36 AM   #3
manoj_aceic
LQ Newbie
 
Registered: Aug 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
dont have much idea about scipting.
any script do you have?
 
Old 08-31-2015, 04:43 AM   #4
manoj_aceic
LQ Newbie
 
Registered: Aug 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
how to setup VPN connection in RHEL 6 server?
so that my employes can access it from outside if it is necessary.
please guide me.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] cannot restart/shutdown if logged in another virtual terminal cccc Debian 3 06-25-2011 12:31 PM
[SOLVED] From 2 days ago, it takes 10 min.s to boot my HP dv9700 laptop. Prior two yr.s, 2 min PTrenholme Linux - Hardware 6 12-28-2010 12:40 PM
[SOLVED] Script(s) to shutdown PC if no users logged in, ldap or TTY Linux.tar.gz Linux - Software 7 10-04-2010 05:17 AM
"shutdown now "problem for RHEL 4 server shipon_97 Linux - Newbie 3 09-19-2007 09:43 PM
3.8 Gb Suse 10.1 slow install in 1h30 min. Mandriva 2006 was less than 40 min Emmanuel_uk Linux - Distributions 2 06-15-2006 10:27 AM


All times are GMT -5. The time now is 01:56 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration