mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
[fix] Don't let grep output message on file not found
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user