mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
Merge pull request #21 from serghey-rodin/master
updates from official vesta
This commit is contained in:
commit
c082c61de9
2 changed files with 60 additions and 65 deletions
|
@ -38,8 +38,8 @@ EOF
|
||||||
sftpc() {
|
sftpc() {
|
||||||
expect -f "-" <<EOF "$@"
|
expect -f "-" <<EOF "$@"
|
||||||
set count 0
|
set count 0
|
||||||
spawn /usr/bin/sftp -o StrictHostKeyChecking=no -o \
|
spawn "/usr/bin/sftp -o StrictHostKeyChecking=no -o \
|
||||||
Port=$port $user@$host
|
Port=$port '$user@$host'"
|
||||||
expect {
|
expect {
|
||||||
"password:" {
|
"password:" {
|
||||||
send "$password\r"
|
send "$password\r"
|
||||||
|
@ -94,12 +94,14 @@ EOF
|
||||||
|
|
||||||
if [ "$type" != 'local' ];then
|
if [ "$type" != 'local' ];then
|
||||||
check_args '4' "$#" "TYPE HOST USERNAME PASSWORD [PATH] [PORT]"
|
check_args '4' "$#" "TYPE HOST USERNAME PASSWORD [PATH] [PORT]"
|
||||||
is_format_valid 'host'
|
is_format_valid 'user' 'host' 'path' 'port'
|
||||||
is_password_valid
|
is_password_valid
|
||||||
if [ "$type" = 'sftp' ]; then
|
if [ "$type" = 'sftp' ]; then
|
||||||
which expect >/dev/null 2>&1
|
which expect >/dev/null 2>&1
|
||||||
check_result $? "expect command not found" $E_NOTEXIST
|
check_result $? "expect command not found" $E_NOTEXIST
|
||||||
fi
|
fi
|
||||||
|
host "$host" >/dev/null 2>&1
|
||||||
|
check_result $? "host connection failed" "$E_CONNECT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ arch=$(uname -i)
|
||||||
os='debian'
|
os='debian'
|
||||||
release=$(cat /etc/debian_version|grep -o [0-9]|head -n1)
|
release=$(cat /etc/debian_version|grep -o [0-9]|head -n1)
|
||||||
codename="$(cat /etc/os-release |grep VERSION= |cut -f 2 -d \(|cut -f 1 -d \))"
|
codename="$(cat /etc/os-release |grep VERSION= |cut -f 2 -d \(|cut -f 1 -d \))"
|
||||||
vestacp="http://$CHOST/$VERSION/$release"
|
vestacp="$VESTA/install/$VERSION/$release"
|
||||||
|
|
||||||
if [ "$release" -eq 9 ]; then
|
if [ "$release" -eq 9 ]; then
|
||||||
software="nginx apache2 apache2-utils apache2-suexec-custom
|
software="nginx apache2 apache2-utils apache2-suexec-custom
|
||||||
|
@ -274,7 +274,7 @@ if [ ! -e '/usr/bin/wget' ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking repository availability
|
# Checking repository availability
|
||||||
wget -q "$vestacp/deb_signing.key" -O /dev/null
|
wget -q "c.vestacp.com/deb_signing.key" -O /dev/null
|
||||||
check_result $? "No access to Vesta repository"
|
check_result $? "No access to Vesta repository"
|
||||||
|
|
||||||
# Check installed packages
|
# Check installed packages
|
||||||
|
@ -682,9 +682,9 @@ chmod 755 /usr/bin/rssh
|
||||||
# Configure VESTA #
|
# Configure VESTA #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Downloading sudo configuration
|
# Installing sudo configuration
|
||||||
mkdir -p /etc/sudoers.d
|
mkdir -p /etc/sudoers.d
|
||||||
wget $vestacp/sudo/admin -O /etc/sudoers.d/admin
|
cp -f $vestacp/sudo/admin /etc/sudoers.d/
|
||||||
chmod 440 /etc/sudoers.d/admin
|
chmod 440 /etc/sudoers.d/admin
|
||||||
|
|
||||||
# Configuring system env
|
# Configuring system env
|
||||||
|
@ -695,8 +695,8 @@ echo 'PATH=$PATH:'$VESTA'/bin' >> /root/.bash_profile
|
||||||
echo 'export PATH' >> /root/.bash_profile
|
echo 'export PATH' >> /root/.bash_profile
|
||||||
source /root/.bash_profile
|
source /root/.bash_profile
|
||||||
|
|
||||||
# Configuring logrotate for vesta logs
|
# Configuring logrotate for Vesta logs
|
||||||
wget $vestacp/logrotate/vesta -O /etc/logrotate.d/vesta
|
cp -f $vestacp/logrotate/vesta /etc/logrotate.d/
|
||||||
|
|
||||||
# Building directory tree and creating some blank files for vesta
|
# Building directory tree and creating some blank files for vesta
|
||||||
mkdir -p $VESTA/conf $VESTA/log $VESTA/ssl $VESTA/data/ips \
|
mkdir -p $VESTA/conf $VESTA/log $VESTA/ssl $VESTA/data/ips \
|
||||||
|
@ -808,25 +808,18 @@ echo "LANGUAGE='$lang'" >> $VESTA/conf/vesta.conf
|
||||||
# Version
|
# Version
|
||||||
echo "VERSION='0.9.8'" >> $VESTA/conf/vesta.conf
|
echo "VERSION='0.9.8'" >> $VESTA/conf/vesta.conf
|
||||||
|
|
||||||
# Downloading hosting packages
|
# Installing hosting packages
|
||||||
cd $VESTA/data
|
cp -rf $vestacp/packages $VESTA/data/
|
||||||
wget $vestacp/packages.tar.gz -O packages.tar.gz
|
|
||||||
tar -xzf packages.tar.gz
|
|
||||||
rm -f packages.tar.gz
|
|
||||||
|
|
||||||
# Downloading templates
|
# Installing templates
|
||||||
wget $vestacp/templates.tar.gz -O templates.tar.gz
|
cp -rf $vestacp/templates $VESTA/data/
|
||||||
tar -xzf templates.tar.gz
|
|
||||||
rm -f templates.tar.gz
|
|
||||||
|
|
||||||
# Copying index.html to default documentroot
|
# Copying index.html to default documentroot
|
||||||
cp templates/web/skel/public_html/index.html /var/www/
|
cp $VESTA/data/templates/web/skel/public_html/index.html /var/www/
|
||||||
sed -i 's/%domain%/It worked!/g' /var/www/index.html
|
sed -i 's/%domain%/It worked!/g' /var/www/index.html
|
||||||
|
|
||||||
# Downloading firewall rules
|
# Installing firewall rules
|
||||||
wget $vestacp/firewall.tar.gz -O firewall.tar.gz
|
cp -rf $vestacp/firewall $VESTA/data/
|
||||||
tar -xzf firewall.tar.gz
|
|
||||||
rm -f firewall.tar.gz
|
|
||||||
|
|
||||||
# Configuring server hostname
|
# Configuring server hostname
|
||||||
$VESTA/bin/v-change-sys-hostname $servername 2>/dev/null
|
$VESTA/bin/v-change-sys-hostname $servername 2>/dev/null
|
||||||
|
@ -855,12 +848,12 @@ rm /tmp/vst.pem
|
||||||
|
|
||||||
if [ "$nginx" = 'yes' ]; then
|
if [ "$nginx" = 'yes' ]; then
|
||||||
rm -f /etc/nginx/conf.d/*.conf
|
rm -f /etc/nginx/conf.d/*.conf
|
||||||
wget $vestacp/nginx/nginx.conf -O /etc/nginx/nginx.conf
|
cp -f $vestacp/nginx/nginx.conf /etc/nginx/
|
||||||
wget $vestacp/nginx/status.conf -O /etc/nginx/conf.d/status.conf
|
cp -f $vestacp/nginx/status.conf /etc/nginx/conf.d/
|
||||||
wget $vestacp/nginx/phpmyadmin.inc -O /etc/nginx/conf.d/phpmyadmin.inc
|
cp -f $vestacp/nginx/phpmyadmin.inc /etc/nginx/conf.d/
|
||||||
wget $vestacp/nginx/phppgadmin.inc -O /etc/nginx/conf.d/phppgadmin.inc
|
cp -f $vestacp/nginx/phppgadmin.inc /etc/nginx/conf.d/
|
||||||
wget $vestacp/nginx/webmail.inc -O /etc/nginx/conf.d/webmail.inc
|
cp -f $vestacp/nginx/webmail.inc /etc/nginx/conf.d/
|
||||||
wget $vestacp/logrotate/nginx -O /etc/logrotate.d/nginx
|
cp -f $vestacp/logrotate/nginx /etc/logrotate.d/
|
||||||
echo > /etc/nginx/conf.d/vesta.conf
|
echo > /etc/nginx/conf.d/vesta.conf
|
||||||
mkdir -p /var/log/nginx/domains
|
mkdir -p /var/log/nginx/domains
|
||||||
update-rc.d nginx defaults
|
update-rc.d nginx defaults
|
||||||
|
@ -874,9 +867,9 @@ fi
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
if [ "$apache" = 'yes' ]; then
|
if [ "$apache" = 'yes' ]; then
|
||||||
wget $vestacp/apache2/apache2.conf -O /etc/apache2/apache2.conf
|
cp -f $vestacp/apache2/apache2.conf /etc/apache2/
|
||||||
wget $vestacp/apache2/status.conf -O /etc/apache2/mods-enabled/status.conf
|
cp -f $vestacp/apache2/status.conf /etc/apache2/mods-enabled/
|
||||||
wget $vestacp/logrotate/apache2 -O /etc/logrotate.d/apache2
|
cp -f $vestacp/logrotate/apache2 /etc/logrotate.d/
|
||||||
a2enmod rewrite
|
a2enmod rewrite
|
||||||
a2enmod suexec
|
a2enmod suexec
|
||||||
a2enmod ssl
|
a2enmod ssl
|
||||||
|
@ -909,12 +902,12 @@ fi
|
||||||
|
|
||||||
if [ "$phpfpm" = 'yes' ]; then
|
if [ "$phpfpm" = 'yes' ]; then
|
||||||
if [ "$release" -eq 9 ]; then
|
if [ "$release" -eq 9 ]; then
|
||||||
wget $vestacp/php-fpm/www.conf -O /etc/php/7.0/fpm/pool.d/www.conf
|
cp -f $vestacp/php-fpm/www.conf /etc/php/7.0/fpm/pool.d/www.conf
|
||||||
update-rc.d php7.0-fpm defaults
|
update-rc.d php7.0-fpm defaults
|
||||||
service php7.0-fpm start
|
service php7.0-fpm start
|
||||||
check_result $? "php-fpm start failed"
|
check_result $? "php-fpm start failed"
|
||||||
else
|
else
|
||||||
wget $vestacp/php5-fpm/www.conf -O /etc/php5/fpm/pool.d/www.conf
|
cp -f $vestacp/php5-fpm/www.conf /etc/php5/fpm/pool.d/www.conf
|
||||||
update-rc.d php5-fpm defaults
|
update-rc.d php5-fpm defaults
|
||||||
service php5-fpm start
|
service php5-fpm start
|
||||||
check_result $? "php-fpm start failed"
|
check_result $? "php-fpm start failed"
|
||||||
|
@ -941,7 +934,7 @@ done
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
if [ "$vsftpd" = 'yes' ]; then
|
if [ "$vsftpd" = 'yes' ]; then
|
||||||
wget $vestacp/vsftpd/vsftpd.conf -O /etc/vsftpd.conf
|
cp -f $vestacp/vsftpd/vsftpd.conf /etc/
|
||||||
update-rc.d vsftpd defaults
|
update-rc.d vsftpd defaults
|
||||||
service vsftpd start
|
service vsftpd start
|
||||||
check_result $? "vsftpd start failed"
|
check_result $? "vsftpd start failed"
|
||||||
|
@ -957,7 +950,7 @@ fi
|
||||||
|
|
||||||
if [ "$proftpd" = 'yes' ]; then
|
if [ "$proftpd" = 'yes' ]; then
|
||||||
echo "127.0.0.1 $servername" >> /etc/hosts
|
echo "127.0.0.1 $servername" >> /etc/hosts
|
||||||
wget $vestacp/proftpd/proftpd.conf -O /etc/proftpd/proftpd.conf
|
cp -f $vestacp/proftpd/proftpd.conf /etc/proftpd/
|
||||||
update-rc.d proftpd defaults
|
update-rc.d proftpd defaults
|
||||||
service proftpd start
|
service proftpd start
|
||||||
check_result $? "proftpd start failed"
|
check_result $? "proftpd start failed"
|
||||||
|
@ -978,7 +971,7 @@ if [ "$mysql" = 'yes' ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# MySQL configuration
|
# MySQL configuration
|
||||||
wget $vestacp/mysql/$mycnf -O /etc/mysql/my.cnf
|
cp -f $vestacp/mysql/$mycnf /etc/mysql/my.cnf
|
||||||
mysql_install_db
|
mysql_install_db
|
||||||
update-rc.d mysql defaults
|
update-rc.d mysql defaults
|
||||||
service mysql start
|
service mysql start
|
||||||
|
@ -997,10 +990,10 @@ if [ "$mysql" = 'yes' ]; then
|
||||||
|
|
||||||
# Configuring phpMyAdmin
|
# Configuring phpMyAdmin
|
||||||
if [ "$apache" = 'yes' ]; then
|
if [ "$apache" = 'yes' ]; then
|
||||||
wget $vestacp/pma/apache.conf -O /etc/phpmyadmin/apache.conf
|
cp -f $vestacp/pma/apache.conf /etc/phpmyadmin/
|
||||||
ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
|
ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
|
||||||
fi
|
fi
|
||||||
wget $vestacp/pma/config.inc.php -O /etc/phpmyadmin/config.inc.php
|
cp -f $vestacp/pma/config.inc.php /etc/phpmyadmin/
|
||||||
chmod 777 /var/lib/phpmyadmin/tmp
|
chmod 777 /var/lib/phpmyadmin/tmp
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -1010,16 +1003,15 @@ fi
|
||||||
|
|
||||||
if [ "$postgresql" = 'yes' ]; then
|
if [ "$postgresql" = 'yes' ]; then
|
||||||
ppass=$(gen_pass)
|
ppass=$(gen_pass)
|
||||||
wget $vestacp/postgresql/pg_hba.conf -O /etc/postgresql/*/main/pg_hba.conf
|
cp -f $vestacp/postgresql/pg_hba.conf /etc/postgresql/*/main/
|
||||||
service postgresql restart
|
service postgresql restart
|
||||||
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$ppass'"
|
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$ppass'"
|
||||||
|
|
||||||
# Configuring phpPgAdmin
|
# Configuring phpPgAdmin
|
||||||
if [ "$apache" = 'yes' ]; then
|
if [ "$apache" = 'yes' ]; then
|
||||||
wget $vestacp/pga/phppgadmin.conf \
|
cp -f $vestacp/pga/phppgadmin.conf /etc/apache2/conf.d/
|
||||||
-O /etc/apache2/conf.d/phppgadmin.conf
|
|
||||||
fi
|
fi
|
||||||
wget $vestacp/pga/config.inc.php -O /etc/phppgadmin/config.inc.php
|
cp -f $vestacp/pga/config.inc.php /etc/phppgadmin/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -1028,7 +1020,7 @@ fi
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
if [ "$named" = 'yes' ]; then
|
if [ "$named" = 'yes' ]; then
|
||||||
wget $vestacp/bind/named.conf -O /etc/bind/named.conf
|
cp -f $vestacp/bind/named.conf /etc/bind/
|
||||||
sed -i "s%listen-on%//listen%" /etc/bind/named.conf.options
|
sed -i "s%listen-on%//listen%" /etc/bind/named.conf.options
|
||||||
chown root:bind /etc/bind/named.conf
|
chown root:bind /etc/bind/named.conf
|
||||||
chmod 640 /etc/bind/named.conf
|
chmod 640 /etc/bind/named.conf
|
||||||
|
@ -1049,9 +1041,9 @@ fi
|
||||||
|
|
||||||
if [ "$exim" = 'yes' ]; then
|
if [ "$exim" = 'yes' ]; then
|
||||||
gpasswd -a Debian-exim mail
|
gpasswd -a Debian-exim mail
|
||||||
wget $vestacp/exim/exim4.conf.template -O /etc/exim4/exim4.conf.template
|
cp -f $vestacp/exim/exim4.conf.template /etc/exim4/
|
||||||
wget $vestacp/exim/dnsbl.conf -O /etc/exim4/dnsbl.conf
|
cp -f $vestacp/exim/dnsbl.conf /etc/exim4/
|
||||||
wget $vestacp/exim/spam-blocks.conf -O /etc/exim4/spam-blocks.conf
|
cp -f $vestacp/exim/spam-blocks.conf /etc/exim4/
|
||||||
touch /etc/exim4/white-blocks.conf
|
touch /etc/exim4/white-blocks.conf
|
||||||
|
|
||||||
if [ "$spamd" = 'yes' ]; then
|
if [ "$spamd" = 'yes' ]; then
|
||||||
|
@ -1084,12 +1076,8 @@ fi
|
||||||
|
|
||||||
if [ "$dovecot" = 'yes' ]; then
|
if [ "$dovecot" = 'yes' ]; then
|
||||||
gpasswd -a dovecot mail
|
gpasswd -a dovecot mail
|
||||||
wget $vestacp/dovecot.tar.gz -O /etc/dovecot.tar.gz
|
cp -rf $vestacp/dovecot /etc/
|
||||||
wget $vestacp/logrotate/dovecot -O /etc/logrotate.d/dovecot
|
cp -f $vestacp/logrotate/dovecot /etc/logrotate.d/
|
||||||
cd /etc
|
|
||||||
rm -rf dovecot dovecot.conf
|
|
||||||
tar -xzf dovecot.tar.gz
|
|
||||||
rm -f dovecot.tar.gz
|
|
||||||
chown -R root:root /etc/dovecot*
|
chown -R root:root /etc/dovecot*
|
||||||
update-rc.d dovecot defaults
|
update-rc.d dovecot defaults
|
||||||
service dovecot start
|
service dovecot start
|
||||||
|
@ -1104,7 +1092,7 @@ fi
|
||||||
if [ "$clamd" = 'yes' ]; then
|
if [ "$clamd" = 'yes' ]; then
|
||||||
gpasswd -a clamav mail
|
gpasswd -a clamav mail
|
||||||
gpasswd -a clamav Debian-exim
|
gpasswd -a clamav Debian-exim
|
||||||
wget $vestacp/clamav/clamd.conf -O /etc/clamav/clamd.conf
|
cp -f $vestacp/clamav/clamd.conf /etc/clamav/
|
||||||
/usr/bin/freshclam
|
/usr/bin/freshclam
|
||||||
update-rc.d clamav-daemon defaults
|
update-rc.d clamav-daemon defaults
|
||||||
if [ ! -d "/var/run/clamav" ]; then
|
if [ ! -d "/var/run/clamav" ]; then
|
||||||
|
@ -1145,19 +1133,18 @@ fi
|
||||||
|
|
||||||
if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
|
if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
|
||||||
if [ "$apache" = 'yes' ]; then
|
if [ "$apache" = 'yes' ]; then
|
||||||
wget $vestacp/roundcube/apache.conf -O /etc/roundcube/apache.conf
|
cp -f $vestacp/roundcube/apache.conf /etc/roundcube/
|
||||||
ln -s /etc/roundcube/apache.conf /etc/apache2/conf.d/roundcube.conf
|
ln -s /etc/roundcube/apache.conf /etc/apache2/conf.d/roundcube.conf
|
||||||
fi
|
fi
|
||||||
wget $vestacp/roundcube/main.inc.php -O /etc/roundcube/main.inc.php
|
cp -f $vestacp/roundcube/main.inc.php /etc/roundcube/
|
||||||
wget $vestacp/roundcube/db.inc.php -O /etc/roundcube/db.inc.php
|
cp -f $vestacp/roundcube/db.inc.php /etc/roundcube/
|
||||||
chmod 640 /etc/roundcube/debian-db-roundcube.php
|
chmod 640 /etc/roundcube/debian-db-roundcube.php
|
||||||
chmod 640 /etc/roundcube/config.inc.php
|
chmod 640 /etc/roundcube/config.inc.php
|
||||||
chown root:www-data /etc/roundcube/debian-db-roundcube.php
|
chown root:www-data /etc/roundcube/debian-db-roundcube.php
|
||||||
chown root:www-data /etc/roundcube/config.inc.php
|
chown root:www-data /etc/roundcube/config.inc.php
|
||||||
wget $vestacp/roundcube/vesta.php -O \
|
cp -f $vestacp/roundcube/vesta.php \
|
||||||
/usr/share/roundcube/plugins/password/drivers/vesta.php
|
/usr/share/roundcube/plugins/password/drivers/
|
||||||
wget $vestacp/roundcube/config.inc.php -O \
|
cp -f $vestacp/roundcube/config.inc.php /etc/roundcube/plugins/password/
|
||||||
/etc/roundcube/plugins/password/config.inc.php
|
|
||||||
r="$(gen_pass)"
|
r="$(gen_pass)"
|
||||||
mysql -e "CREATE DATABASE roundcube"
|
mysql -e "CREATE DATABASE roundcube"
|
||||||
mysql -e "GRANT ALL ON roundcube.*
|
mysql -e "GRANT ALL ON roundcube.*
|
||||||
|
@ -1208,10 +1195,7 @@ fi
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
if [ "$fail2ban" = 'yes' ]; then
|
if [ "$fail2ban" = 'yes' ]; then
|
||||||
cd /etc
|
cp -rf $vestacp/fail2ban /etc/
|
||||||
wget $vestacp/fail2ban.tar.gz -O fail2ban.tar.gz
|
|
||||||
tar -xzf fail2ban.tar.gz
|
|
||||||
rm -f fail2ban.tar.gz
|
|
||||||
if [ "$dovecot" = 'no' ]; then
|
if [ "$dovecot" = 'no' ]; then
|
||||||
fline=$(cat /etc/fail2ban/jail.local |grep -n dovecot-iptables -A 2)
|
fline=$(cat /etc/fail2ban/jail.local |grep -n dovecot-iptables -A 2)
|
||||||
fline=$(echo "$fline" |grep enabled |tail -n1 |cut -f 1 -d -)
|
fline=$(echo "$fline" |grep enabled |tail -n1 |cut -f 1 -d -)
|
||||||
|
@ -1222,6 +1206,15 @@ if [ "$fail2ban" = 'yes' ]; then
|
||||||
fline=$(echo "$fline" |grep enabled |tail -n1 |cut -f 1 -d -)
|
fline=$(echo "$fline" |grep enabled |tail -n1 |cut -f 1 -d -)
|
||||||
sed -i "${fline}s/true/false/" /etc/fail2ban/jail.local
|
sed -i "${fline}s/true/false/" /etc/fail2ban/jail.local
|
||||||
fi
|
fi
|
||||||
|
if [ "$vsftpd" = 'yes' ]; then
|
||||||
|
#Create vsftpd Log File
|
||||||
|
if [ ! -f "/var/log/vsftpd.log" ]; then
|
||||||
|
touch /var/log/vsftpd.log
|
||||||
|
fi
|
||||||
|
fline=$(cat /etc/fail2ban/jail.local |grep -n vsftpd-iptables -A 2)
|
||||||
|
fline=$(echo "$fline" |grep enabled |tail -n1 |cut -f 1 -d -)
|
||||||
|
sed -i "${fline}s/false/true/" /etc/fail2ban/jail.local
|
||||||
|
fi
|
||||||
update-rc.d fail2ban defaults
|
update-rc.d fail2ban defaults
|
||||||
service fail2ban start
|
service fail2ban start
|
||||||
check_result $? "fail2ban start failed"
|
check_result $? "fail2ban start failed"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue