monitor script, permissions

123 views
Skip to first unread message

Tom Schwartzman

unread,
Mar 10, 2021, 12:39:10 PM3/10/21
to motioneye

motionEye Version 0.42.1
Motion Version 4.2.2+gitUNKNOWN
OS Version motionEyeOS 20200606
========================
I have implemented a (test) monitor script, which is exactly what you see at the bottom of this web page:

It adds the cpu temp to the overlay in the web browser.

the file is /data/etc/monitor_1 (for camera 1) and its permissions are 755, making it executable.

works well.

however whenever motion/motioneye restarts (i.e. a change in setting in the web UI which forces me to "apply"), the permissions on this file get changed to 644, and it no longer runs b/c it is no longer executable.

Any idea why? or how to fix?

Thanks,

Tom

Kevin Shumaker

unread,
Mar 10, 2021, 12:45:49 PM3/10/21
to Tom Schwartzman, motioneye
Try making a /data/scripts folder with the correct permissions, then copy the file there. (also with the correct permissions.


--
You received this message because you are subscribed to the Google Groups "motioneye" group.
To unsubscribe from this group and stop receiving emails from it, send an email to motioneye+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/motioneye/282879f3-a2c3-41bd-95b9-dbfe7311f9ean%40googlegroups.com.


--
Thanks

Kevin Shumaker


N38° 19' 56.52"
W85° 45' 8.56"

Semper Gumby
“Don't tell people how to do things. Tell them what to do and let them surprise you with their results.” - G.S. Patton, Gen. USA
Ethics are what we do when no one else is looking.
Quis custodiet ipsos custodes?
“There is no end to the good you can do if you don’t care who gets the credit.” - C Powell
You know we're sitting on four million pounds of fuel, one nuclear weapon and a thing that has 270,000 moving parts built by the lowest bidder. Makes you feel good, doesn't it?

Tom Schwartzman

unread,
Mar 10, 2021, 1:09:43 PM3/10/21
to motioneye
Did you mean move it there and create a symbolic link in /data/etc?  That unfortunately doesn't change the behavior, the /data/scripts/motion_1 gets changed to non-executable.

Just copying there (so it is in both places) - the /data/etc version gets changed to non-executable and it doesn't run.

Just moving it there (without changing any config files) - does not run.

Tom

Tom Schwartzman

unread,
Mar 10, 2021, 1:12:07 PM3/10/21
to motioneye
i meant /data/scripts/monitor_1 in the previous reply.

Kevin Shumaker

unread,
Mar 10, 2021, 1:26:46 PM3/10/21
to Tom Schwartzman, motioneye
Created new image for rpizerow
created file /data/etc/monitor_1
copied/pasted from the Monitoring Commands at the bottom to file
ran    chmod 777 /data/etc/monitor1
reboot
upon reboot shows /data/etc/monior_1 as -rwxrwxrwx
and show temp correctly under frame rates.



Kevin Shumaker

unread,
Mar 10, 2021, 1:36:49 PM3/10/21
to Tom Schwartzman, motioneye
Did it as 755, same result
Did it with change timezone, same result.
All changes kept the appropriate permissions, didn't matter how rebooted.

Tom Schwartzman

unread,
Mar 10, 2021, 1:48:55 PM3/10/21
to motioneye
Thanks for testing.  What I was seeing was when you "Apply" changes via the web UI (which restarts motion/motioneye, but not the rpi).

I have since rebooted the rpi and am not seeing the behavior any more.  Seems likes ghosts in the machine.  

Again thanks for trying things out; I should've tried a reboot first anyway.

Reply all
Reply to author
Forward
0 new messages