Upgrade causes the removal of /root/ispconfig due to compile failure

Discussion in 'Feature Requests' started by lawrenceong, Apr 18, 2007.

  1. lawrenceong

    lawrenceong New Member

    Recently, i upgraded my Debian version from Sarge to Etch. As i was trying to upgrade the isp_config version from ISPConfig-2.2.11.tar.gz to ISPConfig-2.2.12.tar.gz, it basically removed everything in /root/ispconfig and .. nothing else, all due to a compilation failure.

    The compilation error happened because the system was missing a new -dev package for mysql. Even though it is a compilation failure, it would be better if it did not remove /root/ispconfig and the install_ispconfig directory. This is equivalent to running rm -rf /root/ispconfig without a backup! :eek:

    So how did this happen?

    The setup2 script contains the following snippet of code:

    The text highlighted in red basically says:

    • If you do an upgrade, i would backup your /root/ispconfig to the current directory (usually where you run setup from (aka: the install_ispconfig directory)) and then remove the /root/ispconfig directory

    • On compile failure, remove the install_ispconfig directory

    Well, the problem here is that if there is a compile failure, the /root/ispconfig directory and the backup file are both removed.... leaving you with a system with a broken ispconfig :)

    Can we please have the feature where a compile failure does not rm -rf /root/ispconfig on upgrade?

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The directory must be removed, otherwise the next installation or update attempt will fail.

    Your problem is easily solved, run:

    mkdir /root/ispconfig

    and then unpack and run the setup script again. By the way, the backup of /root/ispconfig is not removed, it is in your /tmp directory.
  3. lawrenceong

    lawrenceong New Member

    I will try this out.

    I've checked /tmp and it's not there. This is the reason why. Check out the setup2 script.

    Line 840 removed the install_ispconfig directory, before a copy of the backup was made to /tmp by install.php. This means there's nothing in /tmp.

    install.php runs at line 876, so it never made that backup to /tmp.

    Excerpt from install.php

    Last edited: Apr 19, 2007
  4. lawrenceong

    lawrenceong New Member

    mkdir /root/ispconfig

    Creating the directory /root/ispconfig will make the setup think that it is an upgrade and not touch any of your configuration files.

    However, you would have lost all the custom configuration that you placed in the /root/ispconfig/isp/conf directory.

Share This Page