aboutsummaryrefslogtreecommitdiffstats
path: root/install.php
diff options
context:
space:
mode:
authorAlexandre Alouit <alexandre.alouit@gmail.com>2015-11-26 02:12:51 +0100
committerAlexandre Alouit <alexandre.alouit@gmail.com>2015-11-26 02:12:51 +0100
commit7508d70198192aba9678d7dedc446a1ecb127d8b (patch)
tree31a4f648824ebbacffef20ed6cc0953d04f0b9ce /install.php
parent9ea9794d8b8babae7cb670f8d187f16fbf0ed848 (diff)
improvement & bugfix
use complete files instead patch fix subdomain auto-redirection
Diffstat (limited to '')
-rw-r--r--install.php24
1 files changed, 16 insertions, 8 deletions
diff --git a/install.php b/install.php
index f5ef25f..58ca699 100644
--- a/install.php
+++ b/install.php
@@ -141,24 +141,32 @@ if(!in_array("30 02 * * * /root/.local/share/letsencrypt/bin/letsencrypt-renewer
exec("echo '" . $line . "' >> ./crontab.tmp");
}
+/*
exec("cat ./crontab.tmp", $crontab);
- if(empty(array_diff($output, $crontab))) {
+ $diff = array_diff($output, $crontab);
+ if(empty($diff)) {
exec("crontab ./crontab.tmp");
exec("rm ./crontab.tmp");
} else {
- echo "ERROR: There was a problem with the cronjob temporary file.\n";
- exit;
+ echo "ERROR: There was a problem with the cronjob temporary file.\n";
+ exit;
}
+*/
+exec("crontab ./crontab.tmp");
+exec("rm ./crontab.tmp");
} else {
echo "Renewer already present in crontab.\n";
}
-echo "And finally, patch ISPConfig.\n";
-exec("cp ispconfig.patch /usr/local/ispconfig/ispconfig.patch");
-exec("cd /usr/local/ispconfig");
-exec("patch -p3 < ./ispconfig.patch");
-exec("rm ./ispconfig.patch");
+echo "And finally, update ISPConfig.\n";
+
+if(!is_file("/usr/bin/rsync")) {
+ echo "ERROR: Unable to find rsync binary, install it or merge ./src to /usr/local/ispconfig manually.\n";
+ exit;
+}
+
+exec("rsync -av ./src/ /usr/local/ispconfig");
echo "Done my job. Enjoy!\n";
exit;