Last active
November 29, 2017 17:43
-
-
Save thekuffs/4435888 to your computer and use it in GitHub Desktop.
Install and configure the salt-minion service with nssm. Accidentally posted anonymously in https://gist.github.com/4435871
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write-Host "Configuring salt-minion service" | |
# install the service with nssm. This is where the binary and arguments are specified. | |
c:\salt\nssm.exe install salt-minion c:\salt\salt-minion.exe -c c:\salt\etc\salt -l quiet | |
# Make a friendly name, description, and make it start automatically. | |
Set-Service -name "salt-minion" ` | |
-displayName "Salt Minion" ` | |
-StartupType Automatic ` | |
-Description "Provides secure orchestration and centralized management" | |
# Modify the service to depend on Network Store Interface to ensure the networking stack is up when it starts. | |
New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\services\salt-minion ` | |
-Name "DependOnService" ` | |
-PropertyType MultiString ` | |
-force ` | |
-Value "nsi" | Out-Null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment