LinuxMCE Forums
May 20, 2013, 08:15:56 pm GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
 
   Home   Help Search Chat Login Register  
Pages: [1]
  Print  
Author Topic: Quick/force reload router -> run a script  (Read 1147 times)
purps
NEEDS to work for LinuxMCE
***
Posts: 1269


If it ain't broke, tweak it


View Profile
« on: December 02, 2010, 11:15:53 pm »

Is it possible to make a script run when the router is reloaded?

Cheers,
Matt
Logged

1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps
my blog :: http://projectsofmatt.wordpress.com/
tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #1 on: December 03, 2010, 02:59:35 pm »

What are you wanting to do?

-Thom
Logged
purps
NEEDS to work for LinuxMCE
***
Posts: 1269


If it ain't broke, tweak it


View Profile
« Reply #2 on: December 03, 2010, 03:46:02 pm »

I was intending on writing a little script to carry out a "/etc/init.d/motion restart" command, as I have read that this needs to be done after every router reload. For example...

Code:
#!/bin/bash
sleep 30 && /etc/init.d/motion restart

I assume root privileges are needed, but obviously I would like to do it without typing in a password, so perhaps this is not the best way to do it. Now that I think about it, maybe this could be achieved more easily by placing "/etc/init.d/motion restart" into a pre-exiting file somewhere?

Cheers,
Matt.
Logged

1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps
my blog :: http://projectsofmatt.wordpress.com/
tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #3 on: December 03, 2010, 03:59:53 pm »

Looks like the Motion DCE device needs to be fixed, instead of trying to fire a script each time.

Can someone step up and do this?

Can you please file a bug at least so this can be properly fixed?

-Thom
Logged
purps
NEEDS to work for LinuxMCE
***
Posts: 1269


If it ain't broke, tweak it


View Profile
« Reply #4 on: December 03, 2010, 05:02:56 pm »

I get the message "500 Internal Server Error (Submission rejected as potential spam (SpamBayes determined spam probability of 94.30%))" when I try to submit a ticket! What am I doing wrong?
Logged

1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps
my blog :: http://projectsofmatt.wordpress.com/
jondecker76
Alumni
wants to work for LinuxMCE
*
Posts: 763


View Profile
« Reply #5 on: December 03, 2010, 07:17:24 pm »

I did the bug report:
http://svn.linuxmce.org/trac.cgi/ticket/904

I will also be fixing it. I'll report back here in a few days after I get a chance to work on it.
Logged
DragonK
Guru
****
Posts: 427



View Profile
« Reply #6 on: December 04, 2010, 07:58:41 am »

Hi Guys,

Sorry to "butt in", but isnt this the same ticket???

http://svn.linuxmce.org/trac.cgi/ticket/715

Karel
Logged
jondecker76
Alumni
wants to work for LinuxMCE
*
Posts: 763


View Profile
« Reply #7 on: December 04, 2010, 01:06:30 pm »

Ticket 715 seems to be different - Motion continues to run, but the camera locks up until the camera its self is reset.

Perhaps just to be sure, Purps could also try this and report back:
Reload the router. When Motion stops working, reset the camera by unplugging it and plugging it back in. If it comes back to life, the 2 bugs could be related.
Logged
purps
NEEDS to work for LinuxMCE
***
Posts: 1269


If it ain't broke, tweak it


View Profile
« Reply #8 on: December 04, 2010, 01:13:42 pm »

I have two different types of camera; the Panasonic BL-C10 and the outdoor-type Foscam. I have found that motion does need to be restarted after a router reload. From then on, the Panasonics are fine, but the Foscams stop working after a while, requiring the cameras to be powered down and switched back on before they work again. Could this be the DHCP problem though?
« Last Edit: December 04, 2010, 01:16:02 pm by purps » Logged

1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps
my blog :: http://projectsofmatt.wordpress.com/
jondecker76
Alumni
wants to work for LinuxMCE
*
Posts: 763


View Profile
« Reply #9 on: December 04, 2010, 02:26:54 pm »

I know a few people with foscam cameras and they all suffer from random dropouts - i think thats a foscam issue
Logged
b4rney
Guru
****
Posts: 454


View Profile
« Reply #10 on: December 04, 2010, 02:58:38 pm »

I can confirm this.

Sometimes my wired foscam loses dhcp completely and cannot be reached. Either rebooting the camera or simply removing and replacing the ethernet cable works (for a while).

This issue will not be resolved by a motion restart/fix.

FYI if connected to the external network (router with dhcp) this does not occur so it could be a lmce dhcp problem.

Barney
Logged
b4rney
Guru
****
Posts: 454


View Profile
« Reply #11 on: December 04, 2010, 03:06:38 pm »

Just googled this:
http://blog.stead.id.au/2010/06/resolving-foscam-connection-dropouts.html

Barney

Continuing this topic here:
http://forum.linuxmce.org/index.php?topic=10134.0
« Last Edit: December 04, 2010, 06:13:53 pm by b4rney » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!