Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 02-25-2005, 03:03 AM   #1
LQ Newbie
Registered: Jan 2005
Posts: 16

Rep: Reputation: 0
logout script

Hi guys! I've done a simple script to backup some important files to a server. I want this script to run when i shutdown/logout from my system. Is there any way to do it? Something similar to /etc/rc.d/rc.local but initiates when the system is shutdown / logged out.

I could use cron but im worried i might be using the files when the backup starts It could cause the files to corrupt.

I'm running Mandrake 10.1.

Old 02-25-2005, 11:44 AM   #2
Registered: Jan 2005
Distribution: fedora, redhat, gentoo, suse
Posts: 30

Rep: Reputation: 15
there is usually some kind of halt script in /etc/init.d/ depending on your distro...

those are all the things that get done just before shutdown/reboot....

if you want to do something before you logout.... you can edit your .bash_logout script if your using bash.

or you can make your own script and and use chkconfig or rc-update to run it on runlevel 0 or 6.


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
KDE logout script - where is it? Riddick Linux - Software 7 09-08-2005 05:02 PM
.logout script On NetBSD EECore *BSD 0 07-10-2005 01:27 PM
logout after script runs bigdog0007 Linux - Newbie 6 06-24-2005 06:42 PM
KDE logout script Chief Bender Programming 2 07-23-2002 04:15 AM
How logout from login-menu bash script? MikHud Linux - General 0 04-12-2002 01:01 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:37 PM.

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