diff --git a/install_amavis.sh b/install_amavis.sh index 891a3cb..8cc85f2 100755 --- a/install_amavis.sh +++ b/install_amavis.sh @@ -963,7 +963,6 @@ else fi echononl " Disable crontab for user root" -echo "" >> ${logdir}/main.log echo "crontab -r -u root" > $tmp_err_msg crontab -r -u root > $tmp_err_msg 2>&1 if [[ "$?" = "0" ]]; then diff --git a/install_postfixadmin.sh b/install_postfixadmin.sh index a6a9e5e..66675f5 100755 --- a/install_postfixadmin.sh +++ b/install_postfixadmin.sh @@ -148,7 +148,7 @@ if $systemd_supported ; then # - if systemctl -t service list-unit-files \ | grep -e "^apache2.service" \ - | grep -q -E "(enabled|disabled)" 2> /devnull ; then + | grep -q -E "(enabled|disabled)" 2> /dev/null ; then APACHE_SERVICE_FILE=$(systemctl -t service list-unit-files \ | grep -e "^apache2.service" \ diff --git a/install_roundcube.sh b/install_roundcube.sh index 207b0b9..8aed0fb 100755 --- a/install_roundcube.sh +++ b/install_roundcube.sh @@ -109,7 +109,7 @@ if $systemd_supported ; then # - if systemctl -t service list-unit-files \ | grep -e "^apache2.service" \ - | grep -q -E "(enabled|disabled)" 2> /devnull ; then + | grep -q -E "(enabled|disabled)" 2> /dev/null ; then APACHE_SERVICE_FILE=$(systemctl -t service list-unit-files \ | grep -e "^apache2.service" \ diff --git a/upgrade_roundcube.sh b/upgrade_roundcube.sh index a113aa3..2b8f235 100755 --- a/upgrade_roundcube.sh +++ b/upgrade_roundcube.sh @@ -133,7 +133,7 @@ if $systemd_supported ; then # - if systemctl -t service list-unit-files \ | grep -e "^apache2.service" \ - | grep -q -E "(enabled|disabled)" 2> /devnull ; then + | grep -q -E "(enabled|disabled)" 2> /dev/null ; then APACHE_SERVICE_FILE=$(systemctl -t service list-unit-files \ | grep -e "^apache2.service" \ @@ -457,23 +457,21 @@ echo -e "\n\n \033[37m\033[1mSome pre-installation tasks..\033[m\n" ## - Disable crontab for user root ## - echononl " Backup crontab" -echo "" >> ${logdir}/main.log -echo "crontab -u root -l > $crontab_backup_file" >> ${logdir}/main.log -crontab -u root -l >> $crontab_backup_file 2>> ${logdir}/main.log +crontab -u root -l >> $crontab_backup_file 2> $log_file if [[ "$?" = "0" ]]; then echo_ok else echo_failed + error "$(cat $log_file)" fi echononl " Disable crontab for user root" -echo "" >> ${logdir}/main.log -echo "crontab -r -u root" >> ${logdir}/main.log -crontab -r -u root >> ${logdir}/main.log 2>&1 +crontab -r -u root > $log_file 2>&1 if [[ "$?" = "0" ]]; then echo_ok else echo_failed + error "$(cat $log_file)" fi