[QPKG] SortMyQPKGs

This is the best place for community developers to publish their genius work. Your Apps enrich the QNAP Turbo NAS.
Post Reply
User avatar
gibxxi
Know my way around
Posts: 180
Joined: Mon Mar 30, 2015 11:15 pm
Contact:

Re: [QPKG] SortMyQPKGs

Post by gibxxi »

Yes, your HideThatBanner add-on. Nothing else though.

Dan / Gib.
"Si vis pacem para bellum!"
NAS1: QNAP TS453-Pro (8GB, 4x4TB WD-Red), NAS2: QNAP TS453-Mini (8GB, 4x2TB WD-Red).
User avatar
OneCD
Guru
Posts: 12037
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [QPKG] SortMyQPKGs

Post by OneCD »

No worries, that one's not a big deal. It can be run at any time.

OK, let's wait-and-see. ;)

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
gibxxi
Know my way around
Posts: 180
Joined: Mon Mar 30, 2015 11:15 pm
Contact:

Re: [QPKG] SortMyQPKGs

Post by gibxxi »

I only triggered the launch to see if it would run as expected (i.e: display today's date) to confirm a successful launch had been completed, as the "Autofix Requested" line on the output screen is the only indicator of a succesful run. Is it therefore the case that if there are no changes to be made, the log isn't updated? If so, that might explain why I'm not seeing log updates previously.
"Si vis pacem para bellum!"
NAS1: QNAP TS453-Pro (8GB, 4x4TB WD-Red), NAS2: QNAP TS453-Mini (8GB, 4x2TB WD-Red).
User avatar
OneCD
Guru
Posts: 12037
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [QPKG] SortMyQPKGs

Post by OneCD »

gibxxi wrote: Tue Sep 10, 2019 4:32 am Is it therefore the case that if there are no changes to be made, the log isn't updated?
No, the sorter always sorts and always logs that operation.

I had considered only sorting and logging if it was required (as a potential speedup), but then realised the script would take the same amount of time to run. It would need to perform a sort then compare the 'before' and 'after' lists to determine any difference. Which means a 'sort' operation is needed either way. So, I scrapped that idea, and now it always sorts, whether it's needed or not. ;)

Thinking out-loud, maybe I could get SortMyQPKGs to sort [qpkg.conf], then store the modification datetime? Afterward, the sorter only runs if that modified datetime is different (which means a QPKG has been installed or removed).

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
gibxxi
Know my way around
Posts: 180
Joined: Mon Mar 30, 2015 11:15 pm
Contact:

Re: [QPKG] SortMyQPKGs

Post by gibxxi »

Well, just to be sure, I just went back and checked the two files again, and now they are both identical in filesize and content (462 lines). I also ran the compare plugin from notepad++ on them, and they match. So somewhere, somehow, your code is being removed. One thing that does run after a bootup, is the QNAP malware removal tool, could this be reverting the files (clutching at straws here)?

Dan / Gib.
"Si vis pacem para bellum!"
NAS1: QNAP TS453-Pro (8GB, 4x4TB WD-Red), NAS2: QNAP TS453-Mini (8GB, 4x2TB WD-Red).
User avatar
gibxxi
Know my way around
Posts: 180
Joined: Mon Mar 30, 2015 11:15 pm
Contact:

Re: [QPKG] SortMyQPKGs

Post by gibxxi »

Actually, scratch that. The line:

Code: Select all

/etc/init.d/sort-my-qpkgs.sh autofix
Is present in both files (line 447).

Dan / Gib.
"Si vis pacem para bellum!"
NAS1: QNAP TS453-Pro (8GB, 4x4TB WD-Red), NAS2: QNAP TS453-Mini (8GB, 4x2TB WD-Red).
User avatar
OneCD
Guru
Posts: 12037
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [QPKG] SortMyQPKGs

Post by OneCD »

Ah, OK. :)

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
gibxxi
Know my way around
Posts: 180
Joined: Mon Mar 30, 2015 11:15 pm
Contact:

Re: [QPKG] SortMyQPKGs

Post by gibxxi »

I also have a copy of the 4.4.1 (beta 4) firmware, so can *force* another update if deemed nessecary, but since QNAP's normal firmware has more than enough issues at times, I'm holding off making that jump at this time. I'll let things lie as they are for now, and check it again on the weekend. If I haven't posted here again by Sunday, assume it's still working (at that point in time).

Sorry for the merry-go-round on this.

;)

Dan / Gib.
"Si vis pacem para bellum!"
NAS1: QNAP TS453-Pro (8GB, 4x4TB WD-Red), NAS2: QNAP TS453-Mini (8GB, 4x2TB WD-Red).
User avatar
OneCD
Guru
Posts: 12037
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [QPKG] SortMyQPKGs

Post by OneCD »

No problem Gib, I appreciate your willingness to investigate. :geek:

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
gibxxi
Know my way around
Posts: 180
Joined: Mon Mar 30, 2015 11:15 pm
Contact:

Re: [QPKG] SortMyQPKGs

Post by gibxxi »

No problem, thanks for the assistance (As usual). Your a true credit to this community m8.

:)

Dan / Gib.
"Si vis pacem para bellum!"
NAS1: QNAP TS453-Pro (8GB, 4x4TB WD-Red), NAS2: QNAP TS453-Mini (8GB, 4x2TB WD-Red).
User avatar
gibxxi
Know my way around
Posts: 180
Joined: Mon Mar 30, 2015 11:15 pm
Contact:

Re: [QPKG] SortMyQPKGs

Post by gibxxi »

Hi OneCD,

You can remove Alpha status for QSubsonic, AirSonic and Madsonic, etc. as the issue I suggested this workaround for no longer works. It seems QNAP have patched QVPN to close the loophole. If your running QVPN, your custom Subsonic URL won't be accessible, and you'll need to direct connect via host IP or dynamic DNS address (should you have that set up).

If anything, i'd set it as an Omega App now.

Dan / Gib.
"Si vis pacem para bellum!"
NAS1: QNAP TS453-Pro (8GB, 4x4TB WD-Red), NAS2: QNAP TS453-Mini (8GB, 4x2TB WD-Red).
User avatar
OneCD
Guru
Posts: 12037
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [QPKG] SortMyQPKGs

Post by OneCD »

Hey Gib. :geek:

Unsure - will it cause a problem if all media server packages continue to load before the VPN packages as they do now?

If QNAP have patched QVPN, will the new QVPN work on older NAS firmwares (example: 4.2.6.)?

Or, should the media server packages be explicitly removed from ALPHA? If so, will this affect any other packages?

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
gibxxi
Know my way around
Posts: 180
Joined: Mon Mar 30, 2015 11:15 pm
Contact:

Re: [QPKG] SortMyQPKGs

Post by gibxxi »

All I can tell you is based on what I've seen. It seems as if any packages, regardless of load-order position, use internet connectivity on the NAS, they will be routed through QVPN on 4.3.6 and 4.4.1 firmware if it's active with an active VPN connection defined and running.

Entware-std on my system loads before everything else, and I have the Entware version of Deluge running under that. It still routes through QVPN, despite the fact QVPN loads 5 or 6 positions further down the load order (in addition to the Subsonic URL issue, already mentioned). It would seem that my VPN provider does not permit unsolicited inbound connections over the VPN tunnel, so that might be the reason why Subsonic's DNS registration fails, and i'm not seeing any seeding on my torrents in Deluge. All other aspects of the VPN connectivity work as expected.

Subsonic says the web address registration is successful, but I cannot connect via the custom Subsonic URL remotely. I can however connect via my own ISP's IP address and via Dyndns.org, using manually forwarded ports on the router. My router's NAT-PMP / uPNP functionality does not work with respect to Subsonic, so I have to manually assign it's required ports (4040, 4043).

Dan / Gib.
"Si vis pacem para bellum!"
NAS1: QNAP TS453-Pro (8GB, 4x4TB WD-Red), NAS2: QNAP TS453-Mini (8GB, 4x2TB WD-Red).
User avatar
OneCD
Guru
Posts: 12037
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [QPKG] SortMyQPKGs

Post by OneCD »

Okiedoke, I’ll remove them in the next release and see how things go. :)

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
gibxxi
Know my way around
Posts: 180
Joined: Mon Mar 30, 2015 11:15 pm
Contact:

Re: [QPKG] SortMyQPKGs

Post by gibxxi »

On a somewhat related note, avoid anything made by TP-Link if it has device firmware. They hardly ever release firmware updates for the kit they make, unless it's to fix something pretty severe.

Dan / Gib.
"Si vis pacem para bellum!"
NAS1: QNAP TS453-Pro (8GB, 4x4TB WD-Red), NAS2: QNAP TS453-Mini (8GB, 4x2TB WD-Red).
Post Reply

Return to “Community Apps”