Fedora Linux Support Community & Resources Center
Old 13th February 2007, 07:06 AM
NDog Offline
Registered User
Join Date: Oct 2005
Posts: 27
Init Script Help

Hopefully, this is another simple fix.

I have been trying to set up an old computer to be an itunes server using tangerine-0.3.0, so far I have sucessfully compiled tangerine and gotten it up and running. Now I'd like it to act like a service that I can set the runlevels with using chkconfig.

My question is: How do I set it up such that I can use the 'service' command to control the program? i.e. 'service tangerine start' or 'service tangerine stop'

So far I have created a script in /etc/rc.d/init.d called tangerine (and made it executable). I can start tangerine just by typing 'tangerine' (not using the service command) and running 'service tangerine status' reports that it is running and I can stop it using 'service tangerine stop'. However, when I try to start the daemon with 'service tangerine start' I get the following error:

"Starting tangerine/bin/bash: tangerine: command not found"

The section in my init script for starting the daemon is as follows:

"case "$1" in
echo -n "Starting tangerine"
daemon tangerine
touch /var/lock/subsys/tangerine

Any suggestions as to why the command 'tangerine isn't working in the script, but works fine when typed from the command line?

Any help is much appreciated.
Reply With Quote
Old 13th February 2007, 07:56 AM
marcrblevins Offline
Registered User
Join Date: Jun 2006
Location: Texas
Age: 46
Posts: 4,167
You have this as your first line?

And file is root:root ownership?
Started it as su -?
Reply With Quote
Old 14th February 2007, 03:03 AM
NDog Offline
Registered User
Join Date: Oct 2005
Posts: 27
Yes, I have that as my first line, and the file has the same ownerships as all of the other scripts in the directory, and I am attempting to start the service as root.

Here's the contents of the entire file:
# Startup script for tangerine daemon
# chkconfig: 345 85 15 - This statement tells the chkconfig command how to add or delete this process to the boot process
# description: tangerine is a daapd server for music distribution
# processname: tangerine

# Source function library. This creates the operating environment for the process to be started
. /etc/rc.d/init.d/functions

case "$1" in
echo -n "Starting tangerine"
daemon tangerine
touch /var/lock/subsys/tangerine
echo -n "Shutting down tangerine"
killproc tangerine
rm -f /var/lock/subsys/tangerine
status tangerine
$0 stop
$0 start
echo -n "Reloading tangerine"
killproc tangerine -HUP
echo "Usage: $0 {start|stop|restart|reload|status}"
exit 1

exit 0"
Reply With Quote

init, script

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
init.d script rs232 Using Fedora 6 4th December 2006 02:39 AM

Current GMT-time: 16:51 (Tuesday, 22-08-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat