diff --git a/server/mods-available/remoteaction_core_module.inc.php b/server/mods-available/remoteaction_core_module.inc.php index 4416bd8afc8bb77e19f858dacb2db402ac163e79..93752334405fe4a83e961fc2b5fbc2794f08c430 100644 --- a/server/mods-available/remoteaction_core_module.inc.php +++ b/server/mods-available/remoteaction_core_module.inc.php @@ -179,17 +179,16 @@ class remoteaction_core_module { exec("tar xvfz ISPConfig-" . $new_version . ".tar.gz"); /* - * Start the automated update + * Initialize the automated update + * (the update is then done next start of server.sh */ chdir("/tmp/ispconfig3_install/install"); exec("touch autoupdate"); - exec("php -q autoupdate.php"); - + /* * do some clean-up */ exec("rm /tmp/ISPConfig-" . $new_version . ".tar.gz"); - exec("rm /tmp/ispconfig3_install -R"); /* * go back to the "old path" diff --git a/server/server.sh b/server/server.sh index df844bcbe032a38f94450af0b97494047a035397..7302ca43c91f97436502d5eb28c82e1e6d6684e9 100644 --- a/server/server.sh +++ b/server/server.sh @@ -4,4 +4,22 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin . /etc/profile -/usr/bin/php -q /usr/local/ispconfig/server/server.php +if [ -f /tmp/ispconfig3_install/install/autoupdate ]; then + # + # there is a auto-update waiting for update, so let's do it + # + cd /tmp/ispconfig3_install/install + /usr/bin/php -q autoupdate.php + cd / + + # + # do some clean-up + # + rm /tmp/ispconfig3_install -R + +else + # + # there is no update waiting, so lets start the ISPConfig-System + # + /usr/bin/php -q /usr/local/ispconfig/server/server.php +fi \ No newline at end of file