hadojae / redonion

**BETA** A simple buildscript for network security monitoring on RHEL/CentOS
31 stars 5 forks source link

Amend mkdir to `mkdir -p` for easier re-installation of Suricata. #8

Closed phreakinggeek closed 9 years ago

phreakinggeek commented 9 years ago

Lines https://github.com/hadojae/redonion/blob/master/redonion_bootstrap.sh#L831-L846 account for the option to re-install Suricata, unfortunately the rest of the script not so much which throws exceptions due to already existent directories.

This can be rectified by adding -p to the mkdir command, this will create directories both if they do not exist and also does not classify the existence of a directory specified for creation as an error either, allowing the script to run without fault to continue the re-installation process without any additional efforts from the user.

The two problem lines listed below here: https://github.com/hadojae/redonion/blob/master/redonion_bootstrap.sh#L890 https://github.com/hadojae/redonion/blob/master/redonion_bootstrap.sh#L908

hadojae commented 9 years ago

thanks, updated the reinstall check to remove the lua directories in the event that new source is added in the future, and so we know exactly what is in that dir when we rebuild.