This commit is contained in:
m0duspwnens
2020-05-28 08:57:07 -04:00
parent 8b83799253
commit 091cc8b789
2 changed files with 14 additions and 9 deletions

View File

@@ -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
@@ -455,12 +455,15 @@ copy_ssh_key() {
create_local_directories() {
echo "Creating local pillar and salt directories"
PILLARSALTDIR=${SCRIPTDIR::-5}
for i in "pillar" "salt"; do
for d in `find ../$i/ -type d`; do
mkdir -p $local_salt_dir/$d
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
chown -R socore:socore "$local_salt_dir/$i"
done
}

View File

@@ -37,3 +37,5 @@ export DEBIAN_FRONTEND=noninteractive
export default_salt_dir=/opt/so/saltstack/default
export local_salt_dir=/opt/so/saltstack/local
export SCRIPTDIR=$(cd `dirname $0` && pwd)