michealespinola / syno.plexupdate

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

Status: Interrupted #6

Closed tillkruss closed 3 years ago

tillkruss commented 3 years ago

When I go to "Task Scheduler > Run" I get the "Interrupted" status.

The update itself works flawless.

bash /var/services/homes/Till/plexupdate/syno.plexupdate.sh
SYNO.PLEX UPDATER SCRIPT v2.9.9.3

         Script: syno.plexupdate.sh v2.9.9.3
     Script Dir: /var/services/homes/Till/plexupdate
    Running Ver: 2.9.9.3
     Online Ver: 2.3.3
       Released: 2020-09-06 06:34:14-07:00 (154+ days old)
             * No new version found.

       Synology: DS218+ (x86_64), DSM 6.2.3-25426 Update 3
       Plex Dir: /volume1/Plex/Library/Application Support/Plex Media Server
     Plex Token: ...
    Running Ver: 1.21.2.3943-a91458577
     Online Ver: 1.21.3.4014-58bd20c02 (Public Channel)
       Released: 2021-02-06 13:05:57-08:00 (0+ days old)
             * Newer version found!

    New Package: PlexMediaServer-1.21.3.4014-58bd20c02-x86_64.spk
    Package Age: 0+ days old (0+ required for install)

INSTALLING NEW PACKAGE:
----------------------------------------
2021-02-07 11:08:40 URL:https://downloads.plex.tv/plex-media-server-new/1.21.3.4014-58bd20c02/synology/PlexMediaServer-1.21.3.4014-58bd20c02-x86_64.spk [111513600/111513600] -> "/var/services/homes/Till/plexupdate/Archive/Packages/PlexMediaServer-1.21.3.4014-58bd20c02-x86_64.spk" [1]
package Plex Media Server stop successfully

/var/services/homes/Till/plexupdate/Archive/Packages/PlexMediaServer-1.21.3.4014-58bd20c02-x86_64.spk install successfully

package Plex Media Server start successfully
----------------------------------------

    Update from: 1.21.2.3943-a91458577
             to: 1.21.3.4014-58bd20c02 succeeded!

FIXED FEATURES:
----------------------------------------
* (Security) Mitigate against potential DDoS amplification by only responding to UDP requests from LAN
----------------------------------------
Screen Shot 2021-02-07 at 11 10 30 AM
michealespinola commented 3 years ago

Odd! Are you...:

tillkruss commented 3 years ago

Yes, running as root and log files are saved as well.

michealespinola commented 3 years ago

Is the output being logged properly? This is a bit out of my area of expertise but based on my Google searches, the "Interrupted (1)" status error while saving output to a text file can be indicative of a permissions issue for the log file location.

It would explain why the script is working, but still generating an error. I suppose a quick test would be to disable task logging and see if the status error still occurs.

tillkruss commented 3 years ago

Logs are written when no update occurred. This only happens when Plex is actually updated.

michealespinola commented 3 years ago

This only happens when Plex is actually updated.

Oh... Looking at this with fresh eyes I think I know what's going on. Synology DSM doesn't report on positive results for Tasks. So, to get a status message sent to you that reflects positive results (in this case a successful update of Plex), the script intentionally trips an exit status of 1. This causes the DSM to think that there was a problem involved with the script's execution and sends notifications. It otherwise would not send notifications with an exit status of 0.

michealespinola commented 3 years ago

I've updated the readme to reflect this. Thanks for bringing it up as an issue