Many thanks for the tips I am almost there but have a problem now!

This is the output I get:

./xmms2launcher stop
./xmms2launcher: WARNING: cannot read shebang line from /usr/local/bin/xmms2launcher
xmms2launcher not running?

From my current file:

rd1# cat xmms2launcher
#!/bin/sh

# PROVIDE:    xmms2launcher

. /etc/rc.subr

name="xmms2launcher"
rcvar=`set_rcvar`
command="/usr/local/bin/${name} -u kaya"

load_rc_config $name
run_rc_command "$1"

Of which I know call xmms2launcher_enable="YES" from within /etc/rc.conf

The only issue is that the command is here:

rd1# ls /usr/local/bin | grep xmms2
nyxmms2
xmms2
xmms2-et
xmms2-find-avahi
xmms2-launcher
xmms2-mdns-avahi
xmms2d

So if I can't add the - does this mean that I have to create a link to xmms2-launcher with name xmms2launcher??

--K

RW wrote:
On Fri, 08 Jan 2010 12:23:40 +0200
Kaya Saman <[email protected]> wrote:


So far I have modified the script to look like this:

#!/bin/sh

You may  need a PROVIDE LINE e.g.
# PROVIDE:    xmms2launcher


. /etc/rc.subr

name="xmms2-launcher"

You can't use "-" in shell variable names, so you shouldn't use it here
rcvar=`set_rcvar`
command="/usr/local/bin/${name}" -u kaya

The -u kaya needs to go in a <name>_flags variable









_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[email protected]"

_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[email protected]"

Reply via email to