LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 05-16-2012, 09:50 PM   #1
steve51184
Member
 
Registered: Dec 2006
Posts: 381

Rep: Reputation: 30
help making a script run at boot


i'm on debian 6 and i've tried adding something like the below quote to my /etc/crontab file but it never starts the script when the server boots/reboots

Quote:
@reboot /path/to/script
all permissions are correct afaik :/

edit got it to work with:

Quote:
@reboot root "/path/to/scrip"

Last edited by steve51184; 05-16-2012 at 10:07 PM. Reason: solved
 
Old 05-17-2012, 08:43 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
It's the old school answer, but you could put it in /etc/rc.local if you want it to execute on each reboot.
 
Old 05-17-2012, 08:53 PM   #3
steve51184
Member
 
Registered: Dec 2006
Posts: 381

Original Poster
Rep: Reputation: 30
oh cool didn't know about that... i can just add commands to that right?
 
Old 05-17-2012, 09:13 PM   #4
em31amit
Member
 
Registered: Apr 2012
Location: /root
Distribution: Ubuntu, Redhat, Fedora, CentOS
Posts: 190

Rep: Reputation: 55
/etc/rc.local is not exactly for executing something after reboot. it executes whenever run level changed. so if you switch from run level 5 to 3 it will execute scripts which is mentioned into it.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Set Sickbeard to run at boot? kiniki Linux - Newbie 8 09-28-2011 05:29 PM
How to set and run hdparm -m at on boot up. solorize Linux - Hardware 2 04-19-2011 03:25 PM
Using Set UID to run script as root robo555 Linux - Software 3 11-23-2007 12:05 AM
Is a script, run at boot time from init.d, run with root authority? tmbrwolf53 Linux - Server 2 03-31-2007 08:15 PM
startup script to set up iptables rules doesn't run alexfittyfives Debian 2 06-01-2004 07:21 PM

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

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