How to automate stuff

  • Hi,


    is it possible to automate tasks, like creating a DB and a DB user or enable SSL or update SSL cert information from command line? I am thinking about changing values in the DB directly and then run an i-mscp update script to run the necessary events in the background. But I don't know which scripts need to be started.


    In the worst case, I would start developing scripts which use curl or wget to control i-mscp from the command line. But I don't like this idea much.


    Thanks for any response.


    Regards und Gruß


    PS: There is a Wiki entry for a cli tool from 2013 and I saw two entries in the forum, that this cli tool is not working anymore. What about removing this Wiki page or at least adding a message, that it is not valid anymore?

  • Hello,


    A full REST API is planned for version 2.0.0.

    it is possible to automate tasks, like creating a DB and a DB user or enable SSL or update SSL cert information from command line? I am thinking about changing values in the DB directly and then run an i-mscp update script to run the necessary events in the background. But I don't know which scripts need to be started.

    That not so easy and doing that this way without further thinking would lead to many problems (database corruption and so on).


    i-MSCP is an event based application. Many events are triggered when a specific action is taking place. Those events are meant to be listened by 3rd-party components such as listener files and plugins. If your script only provision the database and run the /var/www/imscp/engine/imscp-rqst-mngr backend script, those events (frontEnd side) will never be triggered. This will pose problems for any 3rd-component that should normally acts on different actions (add user, add domain, delete user, delete domain...).


    To resume, if you want really implement something, don't forget that you'll have to trigger the same events with same parameter set.


    PS: There is a Wiki entry for a cli tool from 2013 and I saw two entries in the forum, that this cli tool is not working anymore. What about removing this Wiki page or at least adding a message, that it is not valid anymore?


    That CLI script is deprecated and has never been officially supported. and the page should have been removed long time ago. Do you have the link?

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206