Thanks for talking about hooks, I was unaware of them.

In the end it does not matter, my idea was rather to be able to install 
openwisp / monitoring in openwrt, and since you always have to connect to 
install openwisp, at the same time you can make crontab work, one option is 
that you said, in post- registration-hook.

When monitoring is a package, this will not be necessary.

El lunes, 24 de agosto de 2020 a las 0:09:03 UTC+2, [email protected] 
escribió:

> On Thursday, August 20, 2020 at 2:07:45 AM UTC-5, [email protected] wrote:
>>
>> Yes, i need to reboot the device because the cron is stopped. It's not a 
>> problem for me, i will compile a custom image with this files installed, 
>> but would be great to have an openwrt package or make this optional in 
>> openwisp-config.
>
>
> We have an issue for that: 
> https://github.com/openwisp/lua-monitoring/issues/6
>
> I don't know if the modified template with /etc/rc.local is a good 
>> solution, it also requires a reboot, no?
>>
>
> Yes, you're right.
>
> We can use one of the openwisp-config hooks: 
> https://github.com/openwisp/openwisp-config/#pre-reload-hook
>
> Maybe the post-registration-hook, since it doesn't need to be done all the 
> time, once the empty crontab is created, if the device is rebooted, cron 
> will start automatically at its next boot.
>
> Eg:
>
> touch /etc/openwisp/post-registration-hook
> chmod +x /etc/openwisp/post-registration-hook
>
> vim /etc/openwisp/post-registration-hook
>
> #!/bin/sh
> touch /etc/crontabs/root
> /etc/init.d/cron start
>
> # save
>
>
>
> Regarding sending commands to devices, can be useful in some situations, 
>> most times to test things when you are far from the devices. The 
>> implementation you have thought of at 
>> https://github.com/openwisp/openwisp-controller/issues/253 looks good
>>
>> El miércoles, 19 de agosto de 2020 a las 23:35:37 UTC+2, 
>> [email protected] escribió:
>>
>>> Clarification:
>>>
>>> On Wednesday, August 19, 2020 at 12:26:17 PM UTC-5, Federico Capoano 
>>> wrote:
>>> [...] 
>>>
>>>> Regarding sending commands to devices, OpenWISP does not have this 
>>>> feature yet, but it's on my todo list for the next release, I just noticed 
>>>> it was not in the issue list so I created the issue of the things I will 
>>>> be 
>>>> implementing: 
>>>> https://github.com/openwisp/openwisp-controller/issues/253
>>>>
>>> [...]
>>>
>>> Not for the very next release, but for the one afterwards.
>>> There are already many changes going to be released in 
>>> openwisp-controller 0.8.0, I will work to release the commands feature for 
>>> the 0.9.0 release.
>>>
>>> F.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/openwisp/41cc24f1-39ac-4ef8-87c3-06907cd957cbn%40googlegroups.com.

Reply via email to