QNAP WOL packet send GUI control

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.
ondras
Starting out
Posts: 11
Joined: Wed Sep 12, 2018 4:35 pm

QNAP WOL packet send GUI control

Postby ondras » Fri Sep 14, 2018 4:44 pm

Hi, I have the QNAP TS-228 NAS and I would like to use it as an WOL magic packet sender. I found the QWOL app, but I need to start the wake function from the internet (not my LAN) and I do only have the NAS GUI port (443) openned (can't open any other ports because of my provider).
I can send the magic packet using sh script (viewtopic.php?t=76012), but I need to start it using an button in GUI, not the app's webserver.
I know that every qpkg has it's start/stop script. My question is: Can I modify this script to send the wake packet when starting an qpkg from the App center? Or is there any other way to start sh script from the GUI without openning any other ports?

Thanks for replies

User avatar
storageman
Experience counts
Posts: 3555
Joined: Thu Sep 22, 2011 10:57 pm

Re: QNAP WOL packet send GUI control

Postby storageman » Fri Sep 14, 2018 8:27 pm

You know Qfinder has WOL option I presume.

ondras
Starting out
Posts: 11
Joined: Wed Sep 12, 2018 4:35 pm

Re: QNAP WOL packet send GUI control

Postby ondras » Fri Sep 14, 2018 8:46 pm

storageman wrote:You know Qfinder has WOL option I presume.


I want the NAS to send WOL packet and wake a PC.

User avatar
storageman
Experience counts
Posts: 3555
Joined: Thu Sep 22, 2011 10:57 pm

Re: QNAP WOL packet send GUI control

Postby storageman » Fri Sep 14, 2018 8:51 pm

ondras wrote:
storageman wrote:You know Qfinder has WOL option I presume.


I want the NAS to send WOL packet and wake a PC.

dId you see this?
viewtopic.php?t=64857

ondras
Starting out
Posts: 11
Joined: Wed Sep 12, 2018 4:35 pm

Re: QNAP WOL packet send GUI control

Postby ondras » Fri Sep 14, 2018 9:25 pm

storageman wrote:
ondras wrote:
storageman wrote:You know Qfinder has WOL option I presume.


I want the NAS to send WOL packet and wake a PC.

dId you see this?
viewtopic.php?t=64857


I don't have acces to my router from the internet. I need to solve this only with the NAS itself and only over the 443 port NAS GUI.

User avatar
storageman
Experience counts
Posts: 3555
Joined: Thu Sep 22, 2011 10:57 pm

Re: QNAP WOL packet send GUI control

Postby storageman » Fri Sep 14, 2018 9:30 pm

What about the wakelan stuff mentioned???

ondras
Starting out
Posts: 11
Joined: Wed Sep 12, 2018 4:35 pm

Re: QNAP WOL packet send GUI control

Postby ondras » Fri Sep 14, 2018 10:11 pm

storageman wrote:What about the wakelan stuff mentioned???

The command needs to be executed somehow. I do not have ssh port open, so I need to execute it from GUI. The only way to do this i found is modifying the start/stop script.

Mousetick
Easy as a breeze
Posts: 332
Joined: Thu Aug 24, 2017 10:28 pm

Re: QNAP WOL packet send GUI control

Postby Mousetick » Fri Sep 14, 2018 10:21 pm

ondras wrote:Can I modify this script to send the wake packet when starting an qpkg from the App center?

Yes, but it would be better for you to create your own QPKG with your own start/stop script rather than hacking another QPKG's script.

ondras
Starting out
Posts: 11
Joined: Wed Sep 12, 2018 4:35 pm

Re: QNAP WOL packet send GUI control

Postby ondras » Sat Sep 15, 2018 12:54 am

Mousetick wrote:
ondras wrote:Can I modify this script to send the wake packet when starting an qpkg from the App center?

Yes, but it would be better for you to create your own QPKG with your own start/stop script rather than hacking another QPKG's script.

Yes, that's a better solution. I'll search the forum for information about creating QPKGs. Thanks for replies.

Mousetick
Easy as a breeze
Posts: 332
Joined: Thu Aug 24, 2017 10:28 pm

Re: QNAP WOL packet send GUI control

Postby Mousetick » Sat Sep 15, 2018 1:11 am

You may want to take a look at this: QNAP Development Kit.

You can install the QDK on the NAS itself from the App Center (https://www.qnap.com/en/app_center/?kw=qdk). But the link above is useful because of the documentation.

This allows you to create a skeleton QPKG. You edit the package configuration (qpkg.cfg) according to your needs. Then you add your start/stop script to the package. Then you "build" the QPKG. Finally you install it with App Center.

ondras
Starting out
Posts: 11
Joined: Wed Sep 12, 2018 4:35 pm

Re: QNAP WOL packet send GUI control

Postby ondras » Wed Sep 19, 2018 2:37 am

I have created the QPKG, installed it and it's not working. I used entware to install etherwake. When I run etherwake MAC from the ssh console, it wakes the pc correctly. But when I include it in the start script, it does not work. I haven't modified anything except this script. Where can I find a log from the script's execution? Why does it not work?
Thanks for anwsers.

User avatar
OneCD
Experience counts
Posts: 4766
Joined: Sun Aug 21, 2016 10:48 am
Location: "... there, behind that sofa!"

Re: QNAP WOL packet send GUI control

Postby OneCD » Wed Sep 19, 2018 2:45 am

ondras wrote:When I run etherwake MAC from the ssh console, it wakes the pc correctly. But when I include it in the start script, it does not work. I haven't modified anything except this script. Where can I find a log from the script's execution? Why does it not work?

Can you post your init script?

Debian 'Stretch' on my production NAS (TS-569 Pro), with the backup NAS (TS-559 Pro+) to eventually follow. When that happens, I'll no longer use or support any QNAP firmware. Debian powerup/poweroff times are < 1 minute.

GitHub repos
one.cd.only@gmail.com

Mousetick
Easy as a breeze
Posts: 332
Joined: Thu Aug 24, 2017 10:28 pm

Re: QNAP WOL packet send GUI control

Postby Mousetick » Wed Sep 19, 2018 3:15 am

Yeah, show your script. You probably need to specify the full /path/to/etherwake command, because it's not in the $PATH of the QPKG's environment.

User avatar
Don
Guru
Posts: 11018
Joined: Thu Jan 03, 2008 4:56 am
Location: Long Island, New York
Contact:

Re: QNAP WOL packet send GUI control

Postby Don » Wed Sep 19, 2018 7:19 am

Why are you exposing the GUI interface to the internet. You are asking for trouble.
Read the Online Manuals and use the forum search feature before posting.

It is a recommended to use RAID and have external backups. RAID will protect you from disk failure, keep your system running, and data accessible while the disk is replaced and the RAID rebuilt. Backups will allow you to recover data that is lost or corrupted, or from system failure. One does not replace the other.

Submit bugs and feature requests to QNAP via their Helpdesk app.

NAS: TVS-882BR | F/W: 4.3.4.0675 | 40GB | 2 x M.2 SATA RAID 1 (System) | 4 x M.2 NMVe QM2-4P-384A RAID 10 (Cache) | 5 x 4TB HDD RAID 6 (Data) | 1 x Blu-ray
NAS: TVS-663 | F/W: 4.3.4.0695 | 16GB | 2 x M.2 NMVe QM2-2P RAID 1 (Cache) | 4 x 4TB RAID 5
Apps: Boinc, Squid, DNSMasq, PLEX, CrashPlan, QLMS, MP3fs, HBS, Entware, DLstation, +others

ondras
Starting out
Posts: 11
Joined: Wed Sep 12, 2018 4:35 pm

Re: QNAP WOL packet send GUI control

Postby ondras » Wed Sep 19, 2018 4:15 pm

The only command I added to the start script is
etherwake my_comuter's_MAC
(Yes, I added it before the ;; line)
I also think I need the full path, but I couldn't find where is it located.


Return to “Web Server & Applications (Apache + PHP + MySQL / SQLite)”

Who is online

Users browsing this forum: No registered users and 7 guests