Date: Fri, 08 Jan 2010 12:23:40 +0200 From: Kaya Saman <SamanKaya@netscape.net> To: freebsd-questions@freebsd.org Subject: rc.d script not working for Xmms2 :-( Message-ID: <4B4707AC.7050908@netscape.net>
next in thread | raw e-mail | index | archive | help
Hi guys, I'm just attempting to create a startup script for Xmms2 so that the service can autostart on boot! So far I have Google'd around and found very little, the most promising site was this: http://www.freebsd.org/doc/en/articles/rc-scripting/rcng-daemon.html which gives a script of this: #!/bin/sh . /etc/rc.subr name="mumbled" rcvar=`set_rcvar` command="/usr/sbin/${name} load_rc_config $name run_rc_command "$1" So far I have modified the script to look like this: #!/bin/sh . /etc/rc.subr name="xmms2-launcher" rcvar=`set_rcvar` command="/usr/local/bin/${name}" -u kaya load_rc_config $name run_rc_command "$1" and given it the name xmms2-launcher, the location of the script is in /usr/local/etc/rc.d/ I also have this line in /etc/rc.conf: xmms2-launcher_enable="YES" Only when I attempt to start the script I get this information back: -u: not found xmms2-launcher_enable=YES: not found ./xmms2-launcher: WARNING: $xmms2-launcher_enable is not set properly - see rc.conf(5). Cannot 'start' xmms2-launcher. Set xmms2-launcher_enable to YES in /etc/rc.conf or use 'onestart' instead of 'start'. I would like to start the daemon as user kaya which is why I have the -u added in the script but am completely lost now as I'm not great at scripting since this is quite advanced for the simple stuff I do know about! Can anyone help me?? Many thanks and best regards, Kaya
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4B4707AC.7050908>