michealespinola / syno.plexupdate

A script to automagically update Plex Media Server on Synology NAS
GNU General Public License v3.0
309 stars 24 forks source link

Scheduled Task Interrupted with Error and showing success #25

Closed bauzer714 closed 2 years ago

bauzer714 commented 2 years ago

I have the update script executed through Synology scheduled task and noticed that there might be a syntax or additional check that might be required.

Scheduled Task information:

Task Scheduler has completed a scheduled task.

Task: Plex - Auto Update
Start time: Tue, 17 May 2022 04:00:02 GMT
Stop time: Tue, 17 May 2022 04:01:12 GMT
Current status: 1 (Interrupted)

Script Output

SYNO.PLEX UPDATE SCRIPT v4.0.0

         Script: syno.plexupdate.sh v4.0.0
     Script Dir: /volume1/backups/Plex/syno.plexupdate
    Running Ver: 4.0.0
     Online Ver: 4.0.0
       Released: 2022-05-02 23:17:19-04:00 (14+ days old)
                 * No new version found.

awk: cmd. line:1: { print "* " ${BASH_SOURCE[0]} }
awk: cmd. line:1:               ^ syntax error
awk: cmd. line:1: { print "* " ${BASH_SOURCE[0]} }
awk: cmd. line:1:                                ^ syntax error
awk: cmd. line:1: { print "* " ${BASH_SOURCE[0]} }
awk: cmd. line:1:               ^ syntax error
awk: cmd. line:1: { print "* " ${BASH_SOURCE[0]} }
awk: cmd. line:1:                                ^ syntax error
       Synology: DS920+ (x86_64), DSM 7.0.1-42218 Update 3
       Plex Dir: /volume1/PlexMediaServer/AppData/Plex Media Server
     Plex Token: [REDACTED]
    Running Ver: 1.26.0.5715
     Online Ver: 1.26.1.5798 (Public Channel)
       Released: 2022-05-11 05:42:02-04:00 (5+ days old)
                 * Newer version found!

    New Package: PlexMediaServer-1.26.1.5798-99a4a6ac9-x86_64_DSM7.spk
    Package Age: 5+ days old (0+ required for install)

INSTALLING NEW PACKAGE:
----------------------------------------
2022-05-17 04:00:10 URL:https://downloads.plex.tv/plex-media-server-new/1.26.1.5798-99a4a6ac9/synology-dsm7/PlexMediaServer-1.26.1.5798-99a4a6ac9-x86_64_DSM7.spk [103495680/103495680] -> "/volume1/backups/Plex/syno.plexupdate/Archive/Packages/PlexMediaServer-1.26.1.5798-99a4a6ac9-x86_64_DSM7.spk" [1]
{"action":"prepare","error":{"code":0},"stage":"prepare","success":true}

{"error":{"code":0},"results":[{"action":"upgrade","beta":false,"betaIncoming":false,"error":{"code":0},"finished":true,"installReboot":false,"installing":true,"language":"enu","last_stage":"postupgrade","package":"PlexMediaServer","packageName":"Plex Media Server","pid":5406,"scripts":[{"code":0,"message":"","type":"preupgrade"},{"code":0,"message":"","type":"preuninst"},{"code":0,"message":"","type":"postuninst"},{"code":0,"message":"","type":"preinst"},{"code":0,"message":"<br><strong><p style='color:blue'><big><b>Installation Successful!</big></p>\n<br><p style='color:blue'>Note: If Plex cannot access your media, verify user <strong>PlexMediaServer</strong> is granted permission in <strong>Control Panel</strong>.</p><br>\nSet access to your media share(s) by performing the following steps:<br><br>\n1. Open <strong>Control Panel</strong> and select <strong>Shared Folder</strong><br>\n2. Select the share which contains your media and click <strong>Edit</strong><br>\n3. Click the <s
 trong>Permissions</strong> tab<br>\n4. Change the dropdown from <strong>Local Users</strong> to <strong>System internal user</strong><br>\n5. Check the <strong>Read/Write</strong> checkbox for the <strong>PlexMediaServer</strong> user<br>\n6. Click <strong>Save</strong> to confirm the new permissions<br>\n7. Repeat steps 2-6 for each share you want Plex Media Server to access<br>\n","type":"postinst"},{"code":0,"message":"","type":"postupgrade"}],"spk":"/volume1/backups/Plex/syno.plexupdate/Archive/Packages/PlexMediaServer-1.26.1.5798-99a4a6ac9-x86_64_DSM7.spk","stage":"installed_and_stopped","status":"stop","success":true,"username":""}],"success":true}

{"action":"prepare","error":{"code":0},"stage":"prepare","success":true}
----------------------------------------

    Update from: 1.26.0.5715
             to: 1.26.1.5798 succeeded!

FIXED FEATURES:
----------------------------------------
awk: cmd. line:1: { print "* " ${BASH_SOURCE[0]} }
awk: cmd. line:1:               ^ syntax error
awk: cmd. line:1: { print "* " ${BASH_SOURCE[0]} }
awk: cmd. line:1:                                ^ syntax error

There is no Changelog.txt in the archive/script location

image

Here is the contents of the archive/Packages path Changelog.txt

Version 1.26.1.5798 (2022-05-11 05:42:02-04:00)
Public Channel

New Features:

Fixed Features:

----------------------------------------

Version 1.26.0.5715 (2022-04-04 14:10:13-04:00)
Public Channel

New Features:

Fixed Features:

----------------------------------------
seanhamlin commented 2 years ago

Exact same issue for me. Same version and everything.

michealespinola commented 2 years ago

I'm looking into this. I have had it happen and not happen as well.

bauzer714 commented 2 years ago

[Removed this comment]

Bug was opened as #26 and tracked there.

bauzer714 commented 2 years ago

@seanhamlin / @michealespinola - take a peek at the PRs submitted today and let me know your thoughts.

27 - Github Script Check Syntax Error

28 - ChangeLog Syntax Error / Task Interrupted Status