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

Task Interrupted, Syntax Error bugfixes #28

Closed bauzer714 closed 2 years ago

bauzer714 commented 2 years ago

Resolves #25.

Updated ExitStatus to articulate normal vs interrupted exit.

image

image

========================

Modified the awk statements to resolve the syntax error. Email notifications and the changelog text file are now populating correctly.

image

image

========================

Made a few changes to the script file that are NOT included in the check-in for testing. You may have observed them in the provided screenshots.

Convince the script that we have an out-of-date package.

 RunVersion=$(/usr/syno/bin/synopkg version "PlexMediaServer")
+RunVersion="0.0.1-0000"
 RunVersion=$(echo $RunVersion | grep -oP '^.+?(?=\-)')

Prevent installation, but do show that we would have executed the code block

-      /usr/syno/bin/synopkg stop    "PlexMediaServer"
+      echo "Skippping install for testing"
+      #/usr/syno/bin/synopkg stop    "PlexMediaServer"
       printf "\n"
-      /usr/syno/bin/synopkg install "$SPUSFolder/Archive/Packages/$NewPackage"
+      #/usr/syno/bin/synopkg install "$SPUSFolder/Archive/Packages/$NewPackage"
       printf "\n"
-      /usr/syno/bin/synopkg start   "PlexMediaServer"
+      #/usr/syno/bin/synopkg start   "PlexMediaServer"