diff --git a/setup/so-functions b/setup/so-functions index 214d02294..2c028174a 100755 --- a/setup/so-functions +++ b/setup/so-functions @@ -741,12 +741,12 @@ detect_os() { disable_auto_start() { - if crontab -l | grep so-setup; then + if crontab -l | grep so-setup > /dev/null 2>&1; then # Remove the automated setup script from crontab, if it exists logCmd "crontab -u $INSTALLUSERNAME -r" fi - if grep so-setup /home/$INSTALLUSERNAME/.bash_profile; then + if grep so-setup /home/$INSTALLUSERNAME/.bash_profile > /dev/null 2>&1; then # Truncate last line of the bash profile info "Removing auto-run of setup from bash profile" sed -i '$ d' /home/$INSTALLUSERNAME/.bash_profile >> "$setup_log" 2>&1