HI Saurabh,

very interesting! There's no support for a similar feature yet. I started
to build a prototype called "connectors" which allows to connect to devices
via SSH and run commands:
https://groups.google.com/d/msg/openwisp/biDfOmZoJBs/x55AGhlhAgAJ
Although I'm not 100% sure this is the same strategy you want to employ.
Keep in mind some people would consider adding such a feature a potentially
insecure feature and we have to take extra care.

Feel free to keep us updated with your work, I'm sure more people is
interested in this.

Federico

On Tue, Oct 10, 2017 at 8:54 AM Saurabh Chakrabarti <
[email protected]> wrote:

> Hi Guys,
>
> I had a requirement for running commands directly on the device. Would be
> great if I could get your inputs on better ways to achieve this.
>
> For now, I have made changes to the openwisp-config code to monitor if a
> particular file(which contains a ash script) is downloaded or not. This
> happens everytime there is a configuration download on the device. I've
> attached the change patchfile(to be applied on openwisp-config) for
> reference.
>
> From the openwisp-server, I'm creating a script in the following format
> #!/bin/ash
> #<current epoch timestamp>
> <command>
>
> eg.
> [image: Inline image 1]
>
> I also tried the crontab way, but could not get the command to run only
> once and then disappear.
> Although this works, is there a better way to do this?
>
>
>
> --
> 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].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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].
For more options, visit https://groups.google.com/d/optout.

Reply via email to