LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-05-2006, 12:13 AM   #1
gsr_kashyap
Member
 
Registered: Jul 2004
Location: india
Distribution: Ubuntu 9.04
Posts: 150

Rep: Reputation: 15
turn a script to a service


hi everyone,
i have a script that needs to be evoked when ever some command is executed (eg: ftp). i would like it to be some sort of start stop type .i would like to know how u do it and also at different run levels.
 
Old 04-05-2006, 02:31 AM   #2
win32sux
Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
just open the daemon's startup script and add a line to your script...

like if my FTP server's startup script was /etc/rc.d/rc.ftpd then i would just open that in a text editor and add a line to wherever my script is so that it will get executed whenever the rc.ftpd script is executed...

the runlevels your script runs at will be whatever runlevels the rc.ftpd script runs at...

to have it tied-into the binary itself i think you'd have to patch the daemon's source code before you compile it...

just my ...

Last edited by win32sux; 04-05-2006 at 02:32 AM.
 
  


Reply


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
Service check script assafde Linux - Networking 1 02-02-2006 06:46 PM
cgi-bin script: turn off computer hamish Linux - General 2 10-21-2005 09:46 AM
How do you turn an executable into a shell script? Thaidog Linux - Newbie 1 09-20-2004 07:20 PM
Making a script to turn on/off laptop power controll Nappa Slackware 3 11-29-2003 02:16 AM
Shutdown script wont physically turn off my system... cav Slackware 2 09-13-2003 02:06 AM


All times are GMT -5. The time now is 08:41 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration