IP plugin

Discussion in 'Developers' Forum' started by bpssoft, Dec 9, 2007.

  1. bpssoft

    bpssoft Banned


    I want to make the IP config plugin for the server, but i have some question about it.
    What is the best way to make this plugin:
    1. Let the plugin generate the /etc/network/interfaces. also we need to add functionallity for multi ethernet cards
    2. Use a command or an external program to add an ip address to the server

    Also we need to think about the gateway and network subnet

    Already thanks
  2. falko

    falko Super Moderator ISPConfig Developer

    ISPConfig is already able to modify the network configuration - not by modifying /etc/network/interfaces, but by using the ifconfig command (provided that $go_info["server"]["network_config"] is set to 1 in /home/admispconfig/ispconfig/lib/config.inc.php).
  3. bpssoft

    bpssoft Banned

    Yes, but i mean in Version 3
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Solution 1) is nice for debian, but solution 2) will work on all linux distributions. I think we shall create a event for "server_boot" or similar that is called when the server starts and create a plugin that listens to this event and configures the IP with solution 2.

    Yes. If I remember correctly, there is already a field for this in the server configuration that you can retrieve with:

    $server_config = $app->getconf->get_server_config($conf["server_id"], 'server');

Share This Page