Router or camera restart

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Router or camera restart

Post by waaren »

cobra045 wrote: Sunday 26 July 2020 15:13 I don't understand, who can explain this to me ??
Check this for a detailed explanation
Or what is the correct rule for this?
$ sudo setcap cap_net_raw = + eip path_to_domoticz_executable
example (my domoticz binary is in /opt/domoticz directory)

Code: Select all

sudo setcap -v cap_net_raw+eip /opt/domoticz/domoticz    # returns >>  /opt/domoticz/domoticz: OK
sudo getcap /opt/domoticz/domoticz  #returns >> /opt/domoticz/domoticz = cap_net_raw+eip
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
cobra045
Posts: 46
Joined: Friday 12 February 2016 20:58
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.4834
Contact:

Re: Router or camera restart

Post by cobra045 »

waaren wrote: Sunday 26 July 2020 15:33
cobra045 wrote: Sunday 26 July 2020 15:13 I don't understand, who can explain this to me ??
Check this for a detailed explanation
Or what is the correct rule for this?
$ sudo setcap cap_net_raw = + eip path_to_domoticz_executable
example (my domoticz binary is in /opt/domoticz directory)

Code: Select all

sudo setcap -v cap_net_raw+eip /opt/domoticz/domoticz    # returns >>  /opt/domoticz/domoticz: OK
sudo getcap /opt/domoticz/domoticz  #returns >> /opt/domoticz/domoticz = cap_net_raw+eip
Hallo Waaren,

Thanks for this super quick response.

Unfortunately, this information is too much for my limited knowledge.
The question is therefore do I need this for internal use?
I ran a test and it works.

I also looked at the paths on the SD card but can find /opt/ but not /opt/domoticz

Best regards, cobra045
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Router or camera restart

Post by waaren »

cobra045 wrote: Sunday 26 July 2020 20:13 Unfortunately, this information is too much for my limited knowledge.
It is an explanation for why a non root user should get additional capabilities for certain tasks and an overview of what these capabilities are
The question is therefore do I need this for internal use?
If it works and you are OK with not knowing why it works, I am not the person to tell you if you need to understand it or not. There are probably very few people in he world understanding everything there is to know of a system like Linux
I also looked at the paths on the SD card but can find /opt/ but not /opt/domoticz
See my remark that my domoticz binary is in /opt/domoticz. Youre domoticz binary will most likely in another directory. Most users on a raspberry have installed it in the directory /home/pi/domoticz, but you can install it in any directory.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
meyland
Posts: 35
Joined: Wednesday 03 January 2018 16:39
Target OS: Linux
Domoticz version: 2020.2
Location: Denmark
Contact:

Re: Router or camera restart

Post by meyland »

after running setcap, you need to restart your domoticz service. It took me a while to get it to work, and all I should do was to restart.

@waaren, I'm stille looking into the problem I have with the script.I have create a complete test enviroment, so I think is should be possible for me to finde the cause to the problem. I'm going for a week - so until next weekend .... :-)
regards

Peter
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest