CentOS Icon CentOS Logo
CentOS Text
   
  
www.centos.org Forum Index
   CentOS 5 - General Support
  make and run a Script

 

 Bottom   Previous Topic   Next Topic
  •  Rate Thread
      Rate this Thread
      Excellent
      Good
      Average
      Bad
      Terrible
Poster Thread
  •  Toufik
      Toufik
make and run a Script
#1
Newbie
Joined: 2009/11/5
From
Posts: 4
Hi to all,

I am new in Linux World and I have installed CentOS 5.4 on my computer.

I want to run a script before open a Root or User session (I want this script start an appli witout logon as root or any user)

I have in Root a directory (rptr with this files: rptr rptr.cfg and rptr.log)

Usually I open my session as root start the terminal and write this :

cd rptr
nohup ./rptr ./rptr.cfg > rptr.log &


I need to get a script to open this sequence at startup of CentOS but without open any session

Any help would be appreciate to help me to create this script

Regards and sorry for my english.

Toufik
Posted on: 2009/11/5 12:13
Create PDF from Post Print
Top
  •  pjwelsh
      pjwelsh
Re: make and run a Script
#2
Professional Board Member
Joined: 2007/1/7
From Central IL USA
Posts: 1967
An easy shotgun approach may to just add a slightly modified version of you root commands into the already existing file called "/etc/rc.local"
Quote:
cd /root/rptr
nohup ./rptr ./rptr.cfg > rptr.log &
Posted on: 2009/11/5 14:37
Create PDF from Post Print
Top
  •  Toufik
      Toufik
Re: make and run a Script
#3
Newbie
Joined: 2009/11/5
From
Posts: 4
Thanks a lot,

I do what you say and all are working now.

Regards
Posted on: 2009/11/5 17:06
Create PDF from Post Print
Top
 Top   Previous Topic   Next Topic

 


 You cannot start a new topic.
 You can view topic.
 You cannot reply to posts.
 You cannot edit your posts.
 You cannot delete your posts.
 You cannot add new polls.
 You cannot vote in polls.
 You cannot attach files to posts.
 You cannot post without approval.




"Linux" is a registered trademark of Linus Torvalds. | All other trademarks are property of their respective owners. | All other content is Copyright @ 2004-2009 by the CentOS Project or "each individual contributor (forums, comments, etc.) unless otherwise assigned".| Theme based on a theme by 7dana.com