Only try to copy keys & config if they have been uploaded

This commit is contained in:
Marno van der Molen 2014-05-19 15:52:20 +02:00
parent 1ddef49185
commit fc3a2106fd
1 changed files with 11 additions and 3 deletions

View File

@ -1,8 +1,16 @@
# Copy minion keys & config to correct location
New-Item c:\salt\conf\pki\minion\ -ItemType directory | out-null
# Check if minion keys have been uploaded
if (Test-Path C:\tmp\minion.pem) {
cp C:\tmp\minion.pem C:\salt\conf\pki\minion\
cp C:\tmp\minion.pub C:\salt\conf\pki\minion\
}
# Check if minion config has been uploaded
if (Test-Path C:\tmp\minion) {
cp C:\tmp\minion C:\salt\conf\
}
# Detect architecture
if ([IntPtr]::Size -eq 4) {