mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #1410 from Security-Onion-Solutions/fix/disable_auto_start
send to dev/null to prevent output
This commit is contained in:
@@ -741,12 +741,12 @@ detect_os() {
|
|||||||
|
|
||||||
disable_auto_start() {
|
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
|
# Remove the automated setup script from crontab, if it exists
|
||||||
logCmd "crontab -u $INSTALLUSERNAME -r"
|
logCmd "crontab -u $INSTALLUSERNAME -r"
|
||||||
fi
|
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
|
# 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