Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 12-18-2012, 06:14 AM   #1
LQ Newbie
Registered: Dec 2012
Posts: 10

Rep: Reputation: Disabled
How to make a program run background when startup with rc

Hi everyone.
I have a VPS for torrent. I'm using deluge web. I can bind it run background manualy like this:
But I have a crontab to refresh my VPS by reset it each 2 days. Because my vps dont have enough ram.And every time my vps restart I have to start deluge manual so. I thinks I need to write bash for this. But I dont know how to.
I know how to write a bash in start up

sudo mv /filename /etc/init.d/
sudo chmod +x /etc/init.d/filename
sudo update-rc.d /etc/init.d/filename defaults

but I dont know how to call "crtl-z" with bash.
Please help me!

Last edited by gbao256; 12-18-2012 at 06:16 AM.
Old 12-18-2012, 07:44 AM   #2
LQ Newbie
Registered: Nov 2011
Posts: 1

Rep: Reputation: Disabled
Appending an ampersand ( & ) to the command runs the job in the background.
Old 12-18-2012, 07:50 AM   #3
LQ Addict
Registered: Jan 2011
Posts: 8,560
Blog Entries: 13

Rep: Reputation: Disabled
Edit /etc/rc.local and stick this in there above/before 'exit 0'

/path/to/deluge-web &


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] sending a startup program to the background zasavage Slackware 2 12-19-2011 08:16 AM
run program in background karabaja4 Linux - Newbie 3 01-05-2008 12:57 PM
How to start 2 background program at startup, one depends on the other? sedan258 Linux - Newbie 5 09-22-2006 07:30 PM
running java program at startup in background Maverick1182 Linux - Newbie 4 09-19-2006 06:09 PM
Run a program in the background??? KaptinKABOOM Linux - Software 5 07-06-2004 06:40 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:13 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration