SBC1 - daemon

If you notice any bugs on our site, please report them here.
jaromrax
Phidgetly
Posts: 23
Joined: Wed May 21, 2008 11:10 am

SBC1 - daemon

Postby jaromrax » Wed Jul 20, 2011 1:23 am

Hello Patrick,
I think that there is a small bug in scripts of SBC1, there should
be $app_cmd instead of $run_app in the automatically created init.d/


Detailed description:
1/ I set up a startup script in /mnt/userspace/.config/init.d/
via the web interface (userspace -> applications).

2/ I have a number of command line parameters
-b -t 1 -f ahoj.bas -c config.sbc1_1 -r ./lcdscroll

3/ I put the application 'disabled' in web interface
and my intentions are to run it from web
with the button <start>. That works. <stop> does not.

4/ I replace $run_app with $app_cmd in the generated script
and then it seems ok:

vi /mnt/userspace/.config/init.d/S50c04_body
the following modified line works:
ps | grep -v grep | grep "$app_cmd" | awk '{print $1}' | xargs kill -KILL



----------------------------------------------------------
Board Name PhidgetSBC
Board Revision 100
Firmware Version 1.0.4.20110615 (full)
Kernel Version Linux version 2.6.32.14 (root@sl) (gcc version 4.3.4 (Buildroot 2010.05) ) #1 PREEMPT Wed Jun 15 13:00:36 MDT 2011
Phidget Library Phidget21 - Version 2.1.8 - Built Jun 15 2011 12:56:53

Best regards
jaromir

User avatar
Patrick
Lead Developer
Posts: 3091
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: SBC1 - daemon

Postby Patrick » Tue Aug 02, 2011 9:58 am

Hi,

Try updating to the latest version of webif and then delete your init script and it will be recreated when you visit the application page in webif.

The problem here is that ps doesn't output the full command with arguments and so it wasn't matching with grep - 'ps auxww' outputs the full command and matches.

app_cmd may match more then one application depending on the name, so it's not the best choice.

-Patrick

User avatar
Patrick
Lead Developer
Posts: 3091
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: SBC1 - daemon

Postby Patrick » Tue Aug 02, 2011 10:00 am

Oops, I missed that you are using an SBC1. I'll fix this bug for the next release.

-Patrick


Return to “Bug Report”

Who is online

Users browsing this forum: No registered users and 1 guest