[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 » Wed Jun 07, 2017 4:25 pm

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 » Wed Jun 07, 2017 4:34 pm

Yes, thanks !

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

Re: [SCRIPT] sort-my-qpkgs

Post by falco18 » Thu Jun 08, 2017 1:19 am

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
Ask me anything
Posts: 8102
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sort-my-qpkgs

Post by OneCD » Thu Jun 08, 2017 2:05 am

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

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

User avatar
OneCD
Ask me anything
Posts: 8102
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [SCRIPT] sort-my-qpkgs

Post by OneCD » Sat Jun 10, 2017 4:37 pm

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?

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

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

Re: [SCRIPT] sort-my-qpkgs

Post by dirkonline » Sat Jun 10, 2017 4:49 pm

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 » Wed Jun 14, 2017 4:14 pm

+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: 512
Joined: Sun Jun 26, 2016 9:28 pm

Re: [SCRIPT] sort-my-qpkgs

Post by peelos » Thu Jun 15, 2017 12:03 am

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-i7K-40G / 4 x 500GB SSD 2.5" / 2 x 500GB M.2 SSD / 8 x 12TB WD Whites 3.5" / Corsair H5-SF Watercooling / 3 x 80mm PWM Noctua fans / Corsair 600W PSU / Asus Turbo GTX 1060 6GB GPU
Software: Plex Media Server / QTransmission / Sonarr / Radarr / Jackett / QMono / Tautulli / OpenHAB / Resilio Sync / QPython / QJDK 8 / NetData / Qapache / 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 / Advanced Tomato Firmware

tonycrouch1183
Starting out
Posts: 13
Joined: Thu May 04, 2017 7:54 am

Re: [SCRIPT] sort-my-qpkgs

Post by tonycrouch1183 » Sat Jun 17, 2017 1:01 am

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
Ask me anything
Posts: 8102
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [QPKG] sort-my-qpkgs

Post by OneCD » Sat Jun 17, 2017 9:07 am

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

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

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

Re: [QPKG] sort-my-qpkgs

Post by dirkonline » Sat Jun 17, 2017 2:16 pm

Thank you :) Installed right away!

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

Re: [QPKG] sort-my-qpkgs

Post by MrVideo » Sat Jun 17, 2017 6:25 pm

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 4.1.n/4.2.n/4.3.n MANUAL
Submit QNAP Support Ticket - QNAP Tutorials, FAQs, Downloads, Wiki - Product Support Status - Moogle's QNAP FAQ help V2
When you ask a question, please include the following
(Thanks to Toxic17 for the links)
QNAP md_checker nasreport (release 20180525)
===============================
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.3.6 Build 20190531 (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

User avatar
OneCD
Ask me anything
Posts: 8102
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: [QPKG] sort-my-qpkgs

Post by OneCD » Sun Jun 18, 2017 1:49 am

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.

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage

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

Re: [QPKG] sort-my-qpkgs

Post by MrVideo » Sun Jun 18, 2017 2:24 pm

Ah, OK. I suggest adding a little note to your first post replacing the ninja-mode note with what really happens.
QTS 4.1.n/4.2.n/4.3.n MANUAL
Submit QNAP Support Ticket - QNAP Tutorials, FAQs, Downloads, Wiki - Product Support Status - Moogle's QNAP FAQ help V2
When you ask a question, please include the following
(Thanks to Toxic17 for the links)
QNAP md_checker nasreport (release 20180525)
===============================
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.3.6 Build 20190531 (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

User avatar
Spider99
Experience counts
Posts: 1946
Joined: Fri Oct 21, 2011 11:14 pm
Location: UK

Re: [QPKG] Sort my QPKGs

Post by Spider99 » Tue Jun 27, 2017 4:14 pm

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”