mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fixed problem with service not starting
This commit is contained in:
parent
f0f512a4da
commit
e61eeba48b
1 changed files with 13 additions and 2 deletions
|
@ -54,7 +54,7 @@ Page custom nsDialogsPage nsDialogsPageLeave
|
|||
!insertmacro MUI_PAGE_INSTFILES
|
||||
|
||||
; Finish page
|
||||
!define MUI_FINISHPAGE_RUN "net"
|
||||
!define MUI_FINISHPAGE_RUN "$INSTDIR\nssm"
|
||||
!define MUI_FINISHPAGE_RUN_PARAMETERS "start salt-minion"
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
|
@ -74,6 +74,7 @@ Page custom nsDialogsPage nsDialogsPageLeave
|
|||
|
||||
; MUI end ------
|
||||
|
||||
|
||||
Function nsDialogsPage
|
||||
nsDialogs::Create 1018
|
||||
Pop $Dialog
|
||||
|
@ -98,6 +99,7 @@ Function nsDialogsPage
|
|||
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Function nsDialogsPageLeave
|
||||
|
||||
${NSD_GetText} $MasterHost $MasterHost_State
|
||||
|
@ -107,6 +109,7 @@ Function nsDialogsPageLeave
|
|||
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Function updateMinionConfig
|
||||
|
||||
ClearErrors
|
||||
|
@ -142,6 +145,7 @@ Function updateMinionConfig
|
|||
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
|
||||
OutFile "Salt-Minion-${PRODUCT_VERSION}-${CPUARCH}-Setup.exe"
|
||||
InstallDir "c:\salt"
|
||||
|
@ -149,6 +153,7 @@ InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
|
|||
ShowInstDetails show
|
||||
ShowUnInstDetails show
|
||||
|
||||
|
||||
Section "MainSection" SEC01
|
||||
|
||||
; Remove previous version of salt, but don't remove conf and key
|
||||
|
@ -193,6 +198,7 @@ Section "MainSection" SEC01
|
|||
|
||||
SectionEnd
|
||||
|
||||
|
||||
Section -Post
|
||||
WriteUninstaller "$INSTDIR\uninst.exe"
|
||||
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\bin\Scripts\salt-minion.exe"
|
||||
|
@ -211,22 +217,26 @@ Section -Post
|
|||
Call updateMinionConfig
|
||||
SectionEnd
|
||||
|
||||
|
||||
Function .onInstSuccess
|
||||
; If the installer is running Silently, start the service
|
||||
IfSilent 0 +2
|
||||
Exec 'net start salt-minion'
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Function un.onUninstSuccess
|
||||
HideWindow
|
||||
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." /SD IDOK
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Function un.onInit
|
||||
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" /SD IDYES IDYES +2
|
||||
Abort
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Function .onInit
|
||||
|
||||
confFind:
|
||||
|
@ -288,6 +298,7 @@ Function .onInit
|
|||
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Function Trim
|
||||
|
||||
Exch $R1 ; Original string
|
||||
|
@ -321,6 +332,7 @@ Function Trim
|
|||
|
||||
FunctionEnd
|
||||
|
||||
|
||||
Section Uninstall
|
||||
ExecWait "net stop salt-minion"
|
||||
ExecWait "sc delete salt-minion"
|
||||
|
@ -334,7 +346,6 @@ Section Uninstall
|
|||
RMDir /r "$INSTDIR"
|
||||
${EndIf}
|
||||
|
||||
|
||||
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
|
||||
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
|
||||
SetAutoClose true
|
||||
|
|
Loading…
Add table
Reference in a new issue