aboutsummaryrefslogtreecommitdiff
path: root/deployment
diff options
context:
space:
mode:
authorAnthony Lavado <anthony@lavado.ca>2019-10-23 03:34:12 -0400
committerAnthony Lavado <anthony@lavado.ca>2019-10-23 03:34:12 -0400
commit14a850b4a833938cea30793c0926cca009a66967 (patch)
treeb8eb9301c15314cd9b03de298ec0651a3886446f /deployment
parent94932ea21614dc8ecb303b4fe44fbe4b120beae0 (diff)
Change the default AppExit action to Exit
When the service should fail to launch Jellyfin, or should Jellyfin crash, the default action is changed from Restart to AppExit. This prevents the service from entering a constant restart due to a permissions issue or similar.
Diffstat (limited to 'deployment')
-rw-r--r--deployment/windows/jellyfin.nsi9
1 files changed, 9 insertions, 0 deletions
diff --git a/deployment/windows/jellyfin.nsi b/deployment/windows/jellyfin.nsi
index f7ed78119..4b3272e3f 100644
--- a/deployment/windows/jellyfin.nsi
+++ b/deployment/windows/jellyfin.nsi
@@ -251,6 +251,15 @@ ${If} $_INSTALLSERVICE_ == "Yes" ; Only run this if we're going to install the s
${EndIf}
DetailPrint "Jellyfin Server service account change, $0"
${EndIf}
+
+ Sleep 3000
+ ConfigureDefaultAppExit:
+ ExecWait '"$INSTDIR\nssm.exe" set JellyfinServer AppExit Default Exit' $0
+ ${If} $0 <> 0
+ !insertmacro ShowError "Could not configure the Jellyfin Server service app exit action." ConfigureDefaultAppExit
+ ${EndIf}
+ DetailPrint "Jellyfin Server service exit action set, $0"
+ ${EndIf}
${EndIf}
SectionEnd