@@ -495,7 +495,7 @@ cp -r /etc/bind/* $vst_backups/bind > /dev/null 2>&1
495495service vsftpd stop > /dev/null 2>&1
496496cp /etc/vsftpd.conf $vst_backups /vsftpd > /dev/null 2>&1
497497
498- # Backing up ProFTPD configuration
498+ # Backup ProFTPD configuration
499499service proftpd stop > /dev/null 2>&1
500500cp /etc/proftpd.conf $vst_backups /proftpd > /dev/null 2>&1
501501
623623# Install packages #
624624# ----------------------------------------------------------#
625625
626- # Update system packages
626+ # Updating system
627627apt-get update
628628
629- # Disable daemon autostart /usr/share/doc/sysv-rc/README.policy-rc.d.gz
630- echo -e ' #!/bin/sh \nexit 101' > /usr/sbin/policy-rc.d
631- chmod a+x /usr/sbin/policy-rc.d
629+ # Disabling daemon autostart /usr/share/doc/sysv-rc/README.policy-rc.d.gz
630+ # echo -e '#!/bin/sh \nexit 101' > /usr/sbin/policy-rc.d
631+ # chmod a+x /usr/sbin/policy-rc.d
632632
633- # Install apt packages
633+ # Installing apt packages
634634apt-get -y install $software
635635check_result $? " apt-get install failed"
636636
637- # Restore policy
637+ # Restoring policy
638638rm -f /usr/sbin/policy-rc.d
639639
640640
641641# ----------------------------------------------------------#
642642# Configure system #
643643# ----------------------------------------------------------#
644644
645- # Enable SSH password auth
645+ # Enabling SSH password auth
646646sed -i " s/rdAuthentication no/rdAuthentication yes/g" /etc/ssh/sshd_config
647647service ssh restart
648648
649- # Disable AWStats cron
649+ # Disabling AWStats cron
650650rm -f /etc/cron.d/awstats
651651
652652# Set directory color
653653echo ' LS_COLORS="$LS_COLORS:di=00;33"' >> /etc/profile
654654
655- # Register /usr/sbin/nologin
656- echo " /usr/sbin/nologin" >> /etc/shells
655+ # Registering /usr/sbin/nologin
656+ if [ -z " $( grep nologin /etc/shells) " ]; then
657+ echo " /usr/sbin/nologin" >> /etc/shells
658+ fi
657659
658- # NTP Sync
660+ # Configuring NTP
659661echo ' #!/bin/sh' > /etc/cron.daily/ntpdate
660662echo " $( which ntpdate) -s ntp.ubuntu.com" >> /etc/cron.daily/ntpdate
661663chmod 775 /etc/cron.daily/ntpdate
662664ntpdate -s ntp.ubuntu.com
663665
664- # Setup rssh
666+ # Adding rssh
665667if [ -z " $( grep /usr/bin/rssh /etc/shells) " ]; then
666668 echo /usr/bin/rssh >> /etc/shells
667669fi
@@ -704,7 +706,6 @@ chmod -R 750 $VESTA/data/queue
704706chmod 660 $VESTA /log/*
705707rm -f /var/log/vesta
706708ln -s $VESTA /log /var/log/vesta
707- chown admin:admin $VESTA /data/sessions
708709chmod 770 $VESTA /data/sessions
709710
710711# Generating Vesta configuration
0 commit comments