[QPKG] SortMyQPKGs

This is the best place for community developers to publish their genius work. Your Apps enrich the QNAP Turbo NAS.
Post Reply
lowfi
Know my way around
Posts: 112
Joined: Fri Oct 16, 2015 10:49 pm

Re: [SCRIPT] sort-my-qpkgs

Post by lowfi »

Great tool. Thanks for this.
GuillaumeJ
Starting out
Posts: 21
Joined: Mon Jan 11, 2016 7:25 pm

Re: [SCRIPT] sort-my-qpkgs

Post by GuillaumeJ »

Yes, thanks !
falco18
New here
Posts: 5
Joined: Wed Dec 09, 2015 12:07 am

Re: [SCRIPT] sort-my-qpkgs

Post by falco18 »

Great, thank you so much. The only hitch I had was that to navigate to the share/Public folder, I had to do "cd /share" and then "cd /share/Public" Maybe this is common knowledge, but I don't use SSH often at all.
User avatar
OneCD
Guru
Posts: 12144
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sort-my-qpkgs

Post by OneCD »

falco18 wrote:The only hitch I had was that to navigate to the share/Public folder, I had to do "cd /share" and then "cd /share/Public"
That's an odd one. :'

You may have accidentally specified a relative path instead of an absolute (example: 'cd share/Public' instead of 'cd /share/Public'). You can check this by searching for 'cd' commands in your BASH history:

Code: Select all

history | grep cd

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
OneCD
Guru
Posts: 12144
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sort-my-qpkgs

Post by OneCD »

Hoping to get some feedback from the community before proceeding further here.

I'm thinking of bundling this script as a QPKG that would run automatically during NAS shutdown in preparation for the next startup. The previous and new QPKG orders would be stored in a log file which could be checked by the user after NAS startup had completed.

This would help make it available to those less comfortable at the CLI as they could install it via the App Center.

Thoughts?

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
dirkonline
Easy as a breeze
Posts: 305
Joined: Mon Oct 18, 2010 4:08 pm

Re: [SCRIPT] sort-my-qpkgs

Post by dirkonline »

That is actually a good idea. I would support this.
ccas
Starting out
Posts: 18
Joined: Wed Jun 05, 2013 9:35 pm

Re: [SCRIPT] sort-my-qpkgs

Post by ccas »

+1 OneCD works very well. Kudos for an Excellent job.

This topic should be pinned/bumped.

QNAP should take this on and provide a GUI version in the firmware. No brainer QNAP engineers..If you watching?!?
User avatar
peelos
Been there, done that
Posts: 580
Joined: Sun Jun 26, 2016 9:28 pm

Re: [SCRIPT] sort-my-qpkgs

Post by peelos »

OneCD wrote:Hoping to get some feedback from the community before proceeding further here.

I'm thinking of bundling this script as a QPKG that would run automatically during NAS shutdown in preparation for the next startup. The previous and new QPKG orders would be stored in a log file which could be checked by the user after NAS startup had completed.

This would help make it available to those less comfortable at the CLI as they could install it via the App Center.

Thoughts?
great idea, I am personally comfortable with SSH but I'm sure a lot of users would much rather use the QPKG from the app center.
NAS: TVS-1282-i7-7700-40G / 4 x 500GB SSD 2.5" RAID 10 / 2 x 500GB M.2 SSD / 8 x 12TB WD Whites 3.5" RAID 6 / Noctua L9x65 / 3 x 80mm PWM Noctua fans / Corsair 600W PSU / Asus Turbo GTX 1060 6GB GPU
Software: Plex Media Server / Transmission / Sonarr / Radarr / Bazarr / Jackett / Tautulli / Home Assistant / Resilio Sync / Python / NetData / SortMyQPKGs
pfSense Firewall / OpenVPN Server: QOTOM Fanless Mini PC / Core i5 / 8GB RAM / 128GB SSD / 4 Gigabit NICs / AES-NI
Wireless Routers: 2 x Netgear AC1900 R7000 Nighthawk / 1 x Netgear AC3200 R8000 Nighthawk / FreshTomato Firmware
tonycrouch1183
Starting out
Posts: 14
Joined: Thu May 04, 2017 7:54 am

Re: [SCRIPT] sort-my-qpkgs

Post by tonycrouch1183 »

Just wanted to throw a shout-out to OneCD for your effort on this! It has fixed all my issues and is easy to accomplish even as an SSH. I would love to see the QPKG you mentioned but either way your work is greatly appreciated!
NAS : TVS-871 - 16GB RAM - Intel(R) Core(TM) i7-4790S CPU @ 3.20GHz
Firmware : 4.3.3.0210 build 20170606
HDD : 8x WDC WD8001FFWX-68J1UN0 83.H0A03 - 1 Storage Pool with RAID-6
UPS : CyberPower 1500AVRLCD USB
User avatar
OneCD
Guru
Posts: 12144
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [QPKG] sort-my-qpkgs

Post by OneCD »

Thanks everyone for your kind words and feedback - it's now a QPKG. Please see the first post. ;)

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
dirkonline
Easy as a breeze
Posts: 305
Joined: Mon Oct 18, 2010 4:08 pm

Re: [QPKG] sort-my-qpkgs

Post by dirkonline »

Thank you :) Installed right away!
User avatar
MrVideo
Experience counts
Posts: 4742
Joined: Fri May 03, 2013 2:26 pm

Re: [QPKG] sort-my-qpkgs

Post by MrVideo »

OK, what if you don't want it to run when you install it? And, how do you run it if you've installed some new packages that need to be sorted?
QTS MANUALS
Submit QNAP Support Ticket - QNAP Tutorials, FAQs, Downloads, Wiki - Product Support Status - Moogle's QNAP FAQ help V2
Asking a question, include the following
(Thanks to Toxic17)
QNAP md_checker nasreport (release 20210309)
===============================
Model: TS-869L -- RAM: 3G -- FW: QTS 4.1.4 Build 20150522 (used for data storage)
WD60EFRX-68L0BN1(x1)/68MYMN1(x7) Red HDDs -- RAID6: 8x6TB -- Cold spare: 1x6TB
Entware
===============================
Model: TS-451A -- RAM: 2G -- FW: QTS 4.5.2 Build 20210202 (used as a video server)
WL3000GSA6472(x3) White label NAS HDDs -- RAID5: 3x3TB
Entware -- MyKodi 17.3 (default is Kodi 16)
===============================
My 2017 Total Solar Eclipse Photos | My 2019 N. Ireland Game of Thrones tour
User avatar
OneCD
Guru
Posts: 12144
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [QPKG] sort-my-qpkgs

Post by OneCD »

MrVideo wrote:OK, what if you don't want it to run when you install it?
Who wouldn't want to run a newly installed QPKG? (except maybe me). ;)

This one doesn't run when installed. It only hooks into the shutdown sequence and runs then.

But, if you'd like to examine it first, you could always install the QDK and disassemble the sort-my-qpkgs package.
MrVideo wrote:And, how do you run it if you've installed some new packages that need to be sorted?
Running this after installing a new package without rebooting wouldn't change anything. This package only affects the launch order of QPKGs. It sorts them all automatically during shutdown, so they load re-sorted during the next NAS startup.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
User avatar
MrVideo
Experience counts
Posts: 4742
Joined: Fri May 03, 2013 2:26 pm

Re: [QPKG] sort-my-qpkgs

Post by MrVideo »

Ah, OK. I suggest adding a little note to your first post replacing the ninja-mode note with what really happens.
QTS MANUALS
Submit QNAP Support Ticket - QNAP Tutorials, FAQs, Downloads, Wiki - Product Support Status - Moogle's QNAP FAQ help V2
Asking a question, include the following
(Thanks to Toxic17)
QNAP md_checker nasreport (release 20210309)
===============================
Model: TS-869L -- RAM: 3G -- FW: QTS 4.1.4 Build 20150522 (used for data storage)
WD60EFRX-68L0BN1(x1)/68MYMN1(x7) Red HDDs -- RAID6: 8x6TB -- Cold spare: 1x6TB
Entware
===============================
Model: TS-451A -- RAM: 2G -- FW: QTS 4.5.2 Build 20210202 (used as a video server)
WL3000GSA6472(x3) White label NAS HDDs -- RAID5: 3x3TB
Entware -- MyKodi 17.3 (default is Kodi 16)
===============================
My 2017 Total Solar Eclipse Photos | My 2019 N. Ireland Game of Thrones tour
User avatar
Spider99
Experience counts
Posts: 1951
Joined: Fri Oct 21, 2011 11:14 pm
Location: UK

Re: [QPKG] Sort my QPKGs

Post by Spider99 »

Hi

Does this support "all" packages out the box or does it need to know about package first - i.e. you have to code it in?

Thinking of Emby which needs QMono
Tim

TS-853A(16GB): - 4.3.4.0483 - Static volume - Raid5 - 8 x 4TB HGST Deskstar NAS
Windows Server + StableBit Drivepool and Scanner ~115 TB Backup Server
TS-412 & TS-459 Pro II: Retired
Clients: 3 x Windows 10 Pro(64bit)
Post Reply

Return to “Community Apps”