QNAP WOL packet send GUI control

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

QNAP WOL packet send GUI control

Post by ondras »

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
Ask me anything
Posts: 5507
Joined: Thu Sep 22, 2011 10:57 pm

Re: QNAP WOL packet send GUI control

Post by storageman »

You know Qfinder has WOL option I presume.
ondras
Starting out
Posts: 12
Joined: Wed Sep 12, 2018 4:35 pm

Re: QNAP WOL packet send GUI control

Post by ondras »

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
Ask me anything
Posts: 5507
Joined: Thu Sep 22, 2011 10:57 pm

Re: QNAP WOL packet send GUI control

Post by storageman »

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: 12
Joined: Wed Sep 12, 2018 4:35 pm

Re: QNAP WOL packet send GUI control

Post by ondras »

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
Ask me anything
Posts: 5507
Joined: Thu Sep 22, 2011 10:57 pm

Re: QNAP WOL packet send GUI control

Post by storageman »

What about the wakelan stuff mentioned???
ondras
Starting out
Posts: 12
Joined: Wed Sep 12, 2018 4:35 pm

Re: QNAP WOL packet send GUI control

Post by ondras »

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
Experience counts
Posts: 1081
Joined: Thu Aug 24, 2017 10:28 pm

Re: QNAP WOL packet send GUI control

Post by Mousetick »

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: 12
Joined: Wed Sep 12, 2018 4:35 pm

Re: QNAP WOL packet send GUI control

Post by ondras »

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
Experience counts
Posts: 1081
Joined: Thu Aug 24, 2017 10:28 pm

Re: QNAP WOL packet send GUI control

Post by Mousetick »

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: 12
Joined: Wed Sep 12, 2018 4:35 pm

Re: QNAP WOL packet send GUI control

Post by ondras »

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

Re: QNAP WOL packet send GUI control

Post by OneCD »

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?

ImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImageImage
Mousetick
Experience counts
Posts: 1081
Joined: Thu Aug 24, 2017 10:28 pm

Re: QNAP WOL packet send GUI control

Post by Mousetick »

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: 12289
Joined: Thu Jan 03, 2008 4:56 am
Location: Long Island, New York

Re: QNAP WOL packet send GUI control

Post by Don »

Why are you exposing the GUI interface to the internet. You are asking for trouble.
Use the forum search feature before posting.

Use RAID and 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.

NAS: TVS-882BR | F/W: 5.0.1.2346 | 40GB | 2 x 1TB M.2 SATA RAID 1 (System/VMs) | 3 x 1TB M.2 NMVe QM2-4P-384A RAID 5 (cache) | 5 x 14TB Exos HDD RAID 6 (Data) | 1 x Blu-ray
NAS: TVS-h674 | F/W: 5.0.1.2376 | 16GB | 3 x 18TB RAID 5
Apps: DNSMasq, PLEX, iDrive, QVPN, QLMS, MP3fs, HBS3, Entware, DLstation, VS, +
ondras
Starting out
Posts: 12
Joined: Wed Sep 12, 2018 4:35 pm

Re: QNAP WOL packet send GUI control

Post by ondras »

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.
Locked

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