QNAP WOL packet send GUI control
- OneCD
- Guru
- Posts: 12163
- Joined: Sun Aug 21, 2016 10:48 am
- Location: "... there, behind that sofa!"
-
- Starting out
- Posts: 12
- Joined: Wed Sep 12, 2018 4:35 pm
Re: QNAP WOL packet send GUI control
I need to have access to my NAS from the internet. I'm using the Qfile app on my Android devices to access my data. I also sometimes need to change the configuration from the internet. I only have the 443 port open and I have stopped the photo station app (I know there was a problem with it)Don wrote:Why are you exposing the GUI interface to the internet. You are asking for trouble.
The passwords are strong enough and there's a limit for unsuccessful logins.
-
- Starting out
- Posts: 12
- Joined: Wed Sep 12, 2018 4:35 pm
Re: QNAP WOL packet send GUI control
Ok, here's the script:
Code: Select all
#!/bin/sh
CONF=/etc/config/qpkg.conf
QPKG_NAME="Wake"
QPKG_ROOT=`/sbin/getcfg $QPKG_NAME Install_Path -f ${CONF}`
APACHE_ROOT=`/sbin/getcfg SHARE_DEF defWeb -d Qweb -f /etc/config/def_share.info`
export QNAP_QPKG=$QPKG_NAME
case "$1" in
start)
ENABLED=$(/sbin/getcfg $QPKG_NAME Enable -u -d FALSE -f $CONF)
if [ "$ENABLED" != "TRUE" ]; then
echo "$QPKG_NAME is disabled."
exit 1
fi
etherwake 00:00:00:00:00:00 (MAC censored)
;;
stop)
: ADD STOP ACTIONS HERE
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
exit 0
- OneCD
- Guru
- Posts: 12163
- Joined: Sun Aug 21, 2016 10:48 am
- Location: "... there, behind that sofa!"
Re: QNAP WOL packet send GUI control
How are you running it when testing? Please show, along with the resulting exitcode.
For your purposes, this init can be a lot simpler:
For your purposes, this init can be a lot simpler:
Code: Select all
#!/usr/bin/env bash
case "$1" in
start)
etherwake 00:00:00:00:00:00 (MAC censored)
;;
stop)
: ADD STOP ACTIONS HERE
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac
-
- Starting out
- Posts: 12
- Joined: Wed Sep 12, 2018 4:35 pm
Re: QNAP WOL packet send GUI control
I've installed the QPKG to the NAS, ran in and it did not wake the PC. I don't know where to find some log from the script's execution, so I have no idea what's going on. I did not have enough time to debug it yesterday.
- OneCD
- Guru
- Posts: 12163
- Joined: Sun Aug 21, 2016 10:48 am
- Location: "... there, behind that sofa!"
Re: QNAP WOL packet send GUI control
Before you install the package and expect it to work flawlessly, you first need to test that the init script runs. Please demonstrate how you're doing this.
-
- Starting out
- Posts: 12
- Joined: Wed Sep 12, 2018 4:35 pm
Re: QNAP WOL packet send GUI control
Sorry I'm total beginner. I red the http://download.qnap.com/dev/QDK_Quick_ ... v4_eng.pdf and built the qpkg file. I haven't tested it before building.OneCD wrote:Before you install the package and expect it to work flawlessly, you first need to test that the init script runs. Please demonstrate how you're doing this.
- OneCD
- Guru
- Posts: 12163
- Joined: Sun Aug 21, 2016 10:48 am
- Location: "... there, behind that sofa!"
Re: QNAP WOL packet send GUI control
What is the filename of your init script and what is the path to it? Not the installed package path, but the path to your package source files. If you provide these, it will be easier to show how to run the script.
-
- First post
- Posts: 1
- Joined: Sun Jul 11, 2021 12:54 am
Re: QNAP WOL packet send GUI control
Did you try running a Debian/Ubuntu Docker and run it from there?
I made it work with no problem, also I integrated it with Goggle Assistant.
Contact me if you need assistance.
I made it work with no problem, also I integrated it with Goggle Assistant.
Contact me if you need assistance.
Last edited by OneCD on Sun Jul 11, 2021 3:46 am, edited 1 time in total.
Reason: contact details removed
Reason: contact details removed
- OneCD
- Guru
- Posts: 12163
- Joined: Sun Aug 21, 2016 10:48 am
- Location: "... there, behind that sofa!"