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 02-22-2007, 11:12 AM   #1
essdeeay
Member
 
Registered: Aug 2004
Location: United Kingdom
Distribution: Debian
Posts: 88

Rep: Reputation: 15
Help needed writing a runscript in Gentoo


Can anyone help me with this runscript please? It's urgently needed for tomorrow, and this is my first time doing one. I'm using Gentoo (and tried to follow the article in their wiki).

I could do with getting rid of the long lines too... does \ work?

Many thanks,
Steve.


The errors I'm getting are:

---------
mozart btoolkit # /etc/init.d/BToolkitd start
* Caching service dependencies ... [ ok ]
* ERROR: not enough args.

* Usage: BToolkitd { start|stop|restart }
* BToolkitd without arguments for full help
---------


This is what I have so far:


---------
#!/sbin/runscript
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

# BToolkit directory
set BKITDIR=/usr/bin/btoolkit/BKIT
# BToolkit licence directory
set LICDIR=/usr/bin/btoolkit/BKIT

depend() {
# Needs network
need net
}

start() {
# What's happening?
ebegin "Starting BToolkitd"

# Fingers crossed...
start-stop-daemon --start --background --pidfile /var/run/BToolkitd.pid --make-pidfile --exec $BKITDIR/BToolkitd $LICDIR

# Did it work?
eend $?
}

stop() {
# Foot on the brakes please driver
ebegin "Stopping BToolkitd"

# Stopping...
start-stop-daemon --stop --pidfile /var/run/BToolkitd.pid --name BToolkitd

# Did it work?
eend $?
}

#restart() {i
# Nothing yet
#}
---------
 
Old 02-22-2007, 12:02 PM   #2
asommer
Member
 
Registered: Mar 2003
Location: North Carolina
Distribution: Gentoo
Posts: 168

Rep: Reputation: 30
Mmm...Try adding this under restart()

restart() {
stop
start
}

Maybe you just need to add something there. The thing I've done with startup scripts is to look at one for say Samba and just modify it for whatever program you need.
 
  


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
help needed in writing streaming client sanjay417 Linux - Software 0 02-06-2007 11:58 AM
Qt: Help needed in writing .pro file saneef Programming 2 12-11-2006 12:43 AM
runscript? simple question stuartbaggs Linux - Software 2 06-04-2004 10:35 AM
Help needed in writing Awk Scripts.. TheDarktrooper Red Hat 1 05-04-2004 06:49 PM
needed for UDf packet writing VenimK Linux - Software 1 05-20-2002 11:37 AM

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

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