Skip to content

Commit 4cf01b8

Browse files
committed
DebianInstaller: Fix missing auth.log which
Fail2ban cannot start and installer exits Sftp system was enabled out of order
1 parent c8aadac commit 4cf01b8

File tree

2 files changed

+16
-10
lines changed

2 files changed

+16
-10
lines changed

install/hst-install-debian.sh

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ else
5050
flex whois rssh git idn zip sudo bc ftp lsof ntpdate rrdtool quota
5151
e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban dnsutils
5252
bsdmainutils cron hestia hestia-nginx hestia-php expect libmail-dkim-perl
53-
unrar-free vim-common acl sysstat"
53+
unrar-free vim-common acl sysstat rsyslog"
5454
fi
5555

5656
# Defining help function
@@ -1314,12 +1314,12 @@ fi
13141314

13151315

13161316
#----------------------------------------------------------#
1317-
# Update phpMyAdmin #
1317+
# Configure phpMyAdmin #
13181318
#----------------------------------------------------------#
13191319

13201320
if [ "$mysql" = 'yes' ]; then
13211321
# Display upgrade information
1322-
echo "Upgrade phpMyAdmin to v$pma_v..."
1322+
echo "Installing phpMyAdmin version v$pma_v..."
13231323

13241324
# Download latest phpmyadmin release
13251325
wget --quiet https://files.phpmyadmin.net/phpMyAdmin/$pma_v/phpMyAdmin-$pma_v-all-languages.tar.gz
@@ -1580,6 +1580,12 @@ if [ "$fail2ban" = 'yes' ]; then
15801580
fline=$(echo "$fline" |grep enabled |tail -n1 |cut -f 1 -d -)
15811581
sed -i "${fline}s/false/true/" /etc/fail2ban/jail.local
15821582
fi
1583+
if [ ! -e /var/log/auth.log ]; then
1584+
# Debian workaround: auth logging was moved to systemd
1585+
touch /var/log/auth.log
1586+
chmod 640 /var/log/auth.log
1587+
chown root:adm /var/log/auth.log
1588+
fi
15831589
update-rc.d fail2ban defaults
15841590
service fail2ban start
15851591
check_result $? "fail2ban start failed"
@@ -1625,16 +1631,16 @@ if [ ! -z "$(grep ^admin: /etc/group)" ] && [ "$force" = 'yes' ]; then
16251631
groupdel admin > /dev/null 2>&1
16261632
fi
16271633

1634+
# Enable sftp jail
1635+
$HESTIA/bin/v-add-sys-sftp-jail > /dev/null 2>&1
1636+
check_result $? "can't enable sftp jail"
1637+
16281638
# Adding Hestia admin account
16291639
$HESTIA/bin/v-add-user admin $vpass $email default System Administrator
16301640
check_result $? "can't create admin user"
16311641
$HESTIA/bin/v-change-user-shell admin nologin
16321642
$HESTIA/bin/v-change-user-language admin $lang
16331643

1634-
# Enable sftp jail
1635-
$HESTIA/bin/v-add-sys-sftp-jail > /dev/null 2>&1
1636-
check_result $? "can't enable sftp jail"
1637-
16381644
# Roundcube permissions fix
16391645
if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
16401646
if [ ! -d "/var/log/roundcube" ]; then
@@ -1646,7 +1652,7 @@ fi
16461652
# Configuring system IPs
16471653
$HESTIA/bin/v-update-sys-ip > /dev/null 2>&1
16481654

1649-
# Get main ip
1655+
# Get main IP
16501656
ip=$(ip addr|grep 'inet '|grep global|head -n1|awk '{print $2}'|cut -f1 -d/)
16511657
local_ip=$ip
16521658

install/hst-install-ubuntu.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,12 +1279,12 @@ fi
12791279

12801280

12811281
#----------------------------------------------------------#
1282-
# Update phpMyAdmin #
1282+
# Configure phpMyAdmin #
12831283
#----------------------------------------------------------#
12841284

12851285
if [ "$mysql" = 'yes' ]; then
12861286
# Display upgrade information
1287-
echo "Upgrade phpMyAdmin to v$pma_v..."
1287+
echo "Installing phpMyAdmin version v$pma_v..."
12881288

12891289
# Download latest phpmyadmin release
12901290
wget --quiet https://files.phpmyadmin.net/phpMyAdmin/$pma_v/phpMyAdmin-$pma_v-all-languages.tar.gz

0 commit comments

Comments
 (0)