mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Merge pull request #4610 from Security-Onion-Solutions/airsoup
Fix airgap check
This commit is contained in:
@@ -88,19 +88,6 @@ add_interface_bond0() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
check_airgap() {
|
|
||||||
# See if this is an airgap install
|
|
||||||
AIRGAP=$(cat /opt/so/saltstack/local/pillar/global.sls | grep airgap: | awk '{print $2}')
|
|
||||||
if [[ "$AIRGAP" == "True" ]]; then
|
|
||||||
is_airgap=0
|
|
||||||
UPDATE_DIR=/tmp/soagupdate/SecurityOnion
|
|
||||||
AGDOCKER=/tmp/soagupdate/docker
|
|
||||||
AGREPO=/tmp/soagupdate/Packages
|
|
||||||
else
|
|
||||||
is_airgap=1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
check_container() {
|
check_container() {
|
||||||
docker ps | grep "$1:" > /dev/null 2>&1
|
docker ps | grep "$1:" > /dev/null 2>&1
|
||||||
return $?
|
return $?
|
||||||
|
|||||||
@@ -168,6 +168,19 @@ update_registry() {
|
|||||||
salt-call state.apply registry queue=True
|
salt-call state.apply registry queue=True
|
||||||
}
|
}
|
||||||
|
|
||||||
|
check_airgap() {
|
||||||
|
# See if this is an airgap install
|
||||||
|
AIRGAP=$(cat /opt/so/saltstack/local/pillar/global.sls | grep airgap: | awk '{print $2}')
|
||||||
|
if [[ "$AIRGAP" == "True" ]]; then
|
||||||
|
is_airgap=0
|
||||||
|
UPDATE_DIR=/tmp/soagupdate/SecurityOnion
|
||||||
|
AGDOCKER=/tmp/soagupdate/docker
|
||||||
|
AGREPO=/tmp/soagupdate/Packages
|
||||||
|
else
|
||||||
|
is_airgap=1
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
check_sudoers() {
|
check_sudoers() {
|
||||||
if grep -q "so-setup" /etc/sudoers; then
|
if grep -q "so-setup" /etc/sudoers; then
|
||||||
echo "There is an entry for so-setup in the sudoers file, this can be safely deleted using \"visudo\"."
|
echo "There is an entry for so-setup in the sudoers file, this can be safely deleted using \"visudo\"."
|
||||||
|
|||||||
Reference in New Issue
Block a user