LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Puppy
User Name
Password
Puppy This forum is for the discussion of Puppy Linux.

Notices


Reply
  Search this Thread
Old 01-06-2015, 12:26 AM   #1
Fixit7
Senior Member
 
Registered: Mar 2014
Location: El Lago, Texas
Distribution: Ubuntu_Mate 16.04
Posts: 1,374

Rep: Reputation: 169Reputation: 169
Run script at shutdown


I have a script that copies files to an external drive.

(It is in the Startup directory)

I use it as a backup.

I just found out that it does not always work.

Is there a way to copy files when I shutdown my computer ?

I saw a post here about something similar, but it is confusing and does not seem to have been resolved.
 
Old 01-06-2015, 05:06 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
chkconfig perhaps - but it depends on your Linux version
 
Old 01-06-2015, 06:27 AM   #3
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
In systemd based system there are unit files which run at startup and exit. In sysvinit based ones also have start and stop services. So you can make a start/stop script for backup.
 
  


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
script to run before server shutdown vaishlinux Red Hat 6 04-04-2014 09:11 AM
Run the script at machine shutdown. trumtrak Linux - Newbie 2 03-18-2013 07:38 AM
Getting an /etc/init.d script to run at system shutdown forrie Linux - Server 6 05-05-2010 01:19 PM
Run script on shutdown or reboot VeeDubbs Linux - Server 1 10-23-2008 01:34 PM
How to run a script at startup after a shutdown? kklein9 Linux - Software 3 01-27-2006 03:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Puppy

All times are GMT -5. The time now is 03:07 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