[fix] Don't let grep output message on file not found

This commit is contained in:
William Wernert
2020-12-07 10:58:58 -05:00
parent 3136c66780
commit 38324c226e

View File

@@ -771,7 +771,7 @@ disable_auto_start() {
logCmd "crontab -u $INSTALLUSERNAME -r" logCmd "crontab -u $INSTALLUSERNAME -r"
fi fi
if grep -q so-setup /home/$INSTALLUSERNAME/.bash_profile; then if grep -s -q so-setup /home/$INSTALLUSERNAME/.bash_profile; then
# Truncate last line of the bash profile # Truncate last line of the bash profile
info "Removing auto-run of setup from bash profile" info "Removing auto-run of setup from bash profile"
sed -i '$ d' /home/$INSTALLUSERNAME/.bash_profile >> "$setup_log" 2>&1 sed -i '$ d' /home/$INSTALLUSERNAME/.bash_profile >> "$setup_log" 2>&1