LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-28-2008, 08:25 AM   #1
its_joy
LQ Newbie
 
Registered: Dec 2007
Posts: 6

Rep: Reputation: 0
Script to shutdown a server


Hello,

Can somebody please provide script to shutdown a server?
Any help will be appreciated
 
Old 03-28-2008, 09:00 AM   #2
BlueC
Member
 
Registered: Aug 2007
Posts: 122

Rep: Reputation: 17
the command "shutdown" perhaps? see "man shutdown"
 
Old 03-28-2008, 09:02 AM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Code:
#! /bin/bash
shutdown -h now "Shutting down now..."
Is there something non-obvious that we should be considering?
--- rod.
 
Old 03-28-2008, 03:56 PM   #4
prad77
Member
 
Registered: Mar 2008
Posts: 101

Rep: Reputation: 15
It depends on what server you are shuting down. If it is a Oracle server you have to take of database, ASM shutdown etc before the actual server.

Gentoo

Last edited by prad77; 04-17-2008 at 03:28 AM.
 
Old 03-28-2008, 06:46 PM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Quote:
Originally Posted by prad77 View Post
It depends on what server you are shuting down. If it is a Oracle server you have to take of database, ASM shutdown etc before the actual server.
But wouldn't you have set these up as services, which shutdown would terminate in an orderly way?
--- rod.
 
Old 03-30-2008, 08:45 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Only in an ideal world
 
  


Reply



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
Is there a way to easily shutdown a remote linux server with a shell script? bdb4269 Programming 7 01-26-2007 04:08 PM
shutdown script kehkok Linux - Software 1 06-16-2006 07:05 AM
script at the shutdown dominant SUSE / openSUSE 4 10-15-2005 07:43 AM
shutdown script acidjuice Slackware 3 04-09-2005 05:19 PM
Script to shutdown remotely a server dtournas Slackware 3 02-06-2005 02:26 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:00 PM.

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