Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plex Update Service not automatically restarting #46

Closed
admborkbork opened this issue Apr 10, 2021 · 4 comments
Closed

Plex Update Service not automatically restarting #46

admborkbork opened this issue Apr 10, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@admborkbork
Copy link

Running the script with command-line options interactively as follows:
.\PlexBackup.ps1 -Mode Backup -Type 7zip -PlexAppDataDir 'C:\Program Files (x86)\Plex\Plex Media Server' -BackupRootDir 'F:\Plex-Backup' -Log -ErrorLog -Verbose -Debug
Backup completes successfully, but the "Plex Update Service" does not automatically restart.

I'm 99.9% sure the issue is on line 1917 of PlexBackup.ps1 --
if ($services -and ($services.Count -le 0)) {
should instead read
if ($services -and ($services.Count -gt 0)) {

(In other words, if we stopped a service, the .Count should be >0, and thus we should enter the if and restart a service)

Editing that line as above and re-running the script restarts the Plex Update Service after execution correctly.

@alekdavis alekdavis self-assigned this Apr 10, 2021
@alekdavis
Copy link
Owner

@admborkbork Good catch. I updated the script. Please, give it a try.

@admborkbork
Copy link
Author

Yep, looks great! Thanks!

@alekdavis
Copy link
Owner

@admborkbork Btw, I may be wrong, but I doubt that the Plex app data dir should be at 'C:\Program Files (x86)\Plex\Plex Media Server'. This is the Plex application (program), not data, folder.

@admborkbork
Copy link
Author

Hahaha. Fair point. Must have been a copy-paste error when I was writing the bug text (I didn't explicitly copy the actual command-line, but copy-pasted from my .bat file).

@alekdavis alekdavis added the bug Something isn't working label Apr 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants