mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 01:32:47 +01:00
fix how local salt and pillar dirs are created - https://github.com/Security-Onion-Solutions/securityonion-saltstack/issues/749
This commit is contained in:
@@ -270,7 +270,7 @@ clear_master() {
|
||||
{
|
||||
echo "Clearing old master key";
|
||||
rm -f /etc/salt/pki/minion/minion_master.pub;
|
||||
sytemctl -q restart salt-minion;
|
||||
systemctl -q restart salt-minion;
|
||||
} >> "$setup_log" 2>&1
|
||||
fi
|
||||
|
||||
@@ -454,14 +454,17 @@ copy_ssh_key() {
|
||||
}
|
||||
|
||||
create_local_directories() {
|
||||
echo "Creating local pillar and salt directories"
|
||||
|
||||
for i in "pillar" "salt"; do
|
||||
for d in `find ../$i/ -type d`; do
|
||||
mkdir -p $local_salt_dir/$d
|
||||
done
|
||||
chown -R socore:socore $local_salt_dir/$i
|
||||
done
|
||||
echo "Creating local pillar and salt directories"
|
||||
PILLARSALTDIR=${SCRIPTDIR::-5}
|
||||
for i in "pillar" "salt"; do
|
||||
for d in `find $PILLARSALTDIR/$i -type d`; do
|
||||
suffixdir=${d//$PILLARSALTDIR/}
|
||||
if [ ! -d "$local_salt_dir/$suffixdir" ]; then
|
||||
mkdir -v "$local_salt_dir$suffixdir" >> "$setup_log" 2>&1
|
||||
fi
|
||||
done
|
||||
chown -R socore:socore "$local_salt_dir/$i"
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user