Commit 1946005f authored by Marius Burkard's avatar Marius Burkard
Browse files

- dont compile jailkit for newer os

parent 0fd0d656
......@@ -44,6 +44,10 @@ class ISPConfigDebian10OS extends ISPConfigDebianOS {
return $packages;
}
protected function shallCompileJailkit() {
return false;
}
protected function setDefaultPHP() {
ISPConfigLog::info('Settings default system php version.', true);
$cmd = 'update-alternatives --set php /usr/bin/php7.3 ; update-alternatives --set php-cgi /usr/bin/php-cgi7.3 ; update-alternatives --set php-fpm.sock /run/php/php7.3-fpm.sock';
......
......@@ -262,6 +262,10 @@ class ISPConfigDebianOS extends ISPConfigBaseOS {
}
}
protected function shallCompileJailkit() {
return true;
}
protected function getFail2BanJail() {
$jk_jail = '[pure-ftpd]
enabled = true
......@@ -977,10 +981,13 @@ mailman-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe mailman"';
);
$this->commentLines('/etc/cron.d/awstats', $entries);
$cmd = 'cd /tmp ; ( wget -O jailkit-2.20.tar.gz "http://olivier.sessink.nl/jailkit/jailkit-2.20.tar.gz" > /dev/null 2>&1 && tar xzf jailkit-2.20.tar.gz 2>&1 ) && ( cd jailkit-2.20 ; echo 5 > debian/compat ; ./debian/rules binary 2>&1 ) && ( cd /tmp ; dpkg -i jailkit_2.20-1_*.deb 2>&1 ; rm -rf jailkit-2.20* )';
$result = $this->exec($cmd, array(), 3);
if($result === false) {
throw new ISPConfigOSException('Command ' . $cmd . ' failed.');
if($this->shallCompileJailkit()) {
$cmd = 'cd /tmp ; ( wget -O jailkit-2.20.tar.gz "http://olivier.sessink.nl/jailkit/jailkit-2.20.tar.gz" > /dev/null 2>&1 && tar xzf jailkit-2.20.tar.gz 2>&1 ) && ( cd jailkit-2.20 ; echo 5 > debian/compat ; ./debian/rules binary 2>&1 ) && ( cd /tmp ; dpkg -i jailkit_2.20-1_*.deb 2>&1 ; rm -rf jailkit-2.20* )';
$result = $this->exec($cmd, array(), 3);
if($result === false) {
throw new ISPConfigOSException('Command ' . $cmd . ' failed.');
}
}
}
......
......@@ -60,6 +60,10 @@ deb http://security.ubuntu.com/ubuntu focal-security multiverse
return $packages;
}
protected function shallCompileJailkit() {
return false;
}
protected function addSuryRepo() {
ISPConfigLog::info('Activating sury php repository.', true);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment