Page 1 of 1
Extending the Admin API
Posted: Sat Oct 19, 2013 9:35 am
by Graham
Is there a recommended approach to extending the admin API in Vesta?
For example, if I have another command line tool that I would like to make available through the Vesta admin api.
Any examples that I could perhaps take a look at or that would make a good starting point?
Thanks
Re: Extending the Admin API
Posted: Sat Oct 19, 2013 12:33 pm
by skid
For now you can put additional scripts in /usr/local/vesta/bin/ and they will become available via API. Unfortunately, such method isn't sustainable across updates.
I will think about how we can cover this in feature releases.
Re: Extending the Admin API
Posted: Sat Oct 19, 2013 12:54 pm
by Graham
skid wrote:For now you can put additional scripts in /usr/local/vesta/bin/ and they will become available via API. Unfortunately, such method isn't sustainable across updates.
I will think about how we can cover this in feature releases.
Thanks skid. If I do add scripts now, do you think the updates will wipe them or just make them inoperable?
Re: Extending the Admin API
Posted: Sat Oct 19, 2013 1:17 pm
by skid
That's a good question. It all depends on system package manager and it seems like rpm doesn't wipe bin directory. Not sure about dpkg. I will check it later today.
Re: Extending the Admin API
Posted: Sat Oct 19, 2013 1:33 pm
by Graham
Thanks. At the moment I'm not sure whether to put my additions somewhere else with their own API or try and integrate them with the Vesta API.
Re: Extending the Admin API
Posted: Sat Oct 19, 2013 8:07 pm
by skid
I have a good news, apt-get upgrade didn't wiped directory. So you are safe to go.
Re: Extending the Admin API
Posted: Sat Oct 19, 2013 8:16 pm
by Graham
Fantastic. The approach I have taken so far has been to create additional v-xxxx-xxx-xxx commands. Works perfectly from the command line but I've yet to test it through the API.
Do you know if 'apt-get upgrade' does much to the 'skel' in the vesta templates?
Re: Extending the Admin API
Posted: Sat Oct 19, 2013 8:29 pm
by skid
Anything in /usr/local/vesta/data is beyond the apt or yum knowledge. Feel free to modify and change any file there.
Re: Extending the Admin API
Posted: Sat Oct 19, 2013 8:41 pm
by Graham
:-) this just gets better and better.
Re: Extending the Admin API
Posted: Fri Sep 23, 2016 12:29 pm
by skurudo