Page 3 of 6

Re: Remote Wake-On-LAN Server

Posted: Wed Jan 28, 2015 2:56 pm
by rdagijones
Hello Bigfoot65,

My friend ("thegillion") and I have a new and improved version of the Wake-On-LAN Server. You can download the files at https://github.com/thegillion/WOL-server-w-sql

To test it: (I include some of the code for future readers.)
-create the webapp called "wolserver." (Amahi Web Apps plugin application) does this amazingly well.
-create an SQL database called "wolserver" and import the tables from the download file. (I used PHPMyAdmin to do this.)
-extract the zip
-copy all the files to the /var/hda/web-apps/wolserver/html

Code: Select all

cp -R ~/Downloads/WOL-server-w-sql/* /var/hda/web-apps/wolserver/html/
-change the owner of all the files in /var/hda/web-apps/wolserver/html to apache:users

Code: Select all

chown apache:users /var/hda/web-apps/wolserver/html/*
-edit common.php with your credentials for connecting to the SQL database you created.
-If you want to access the app outside of the network, you will need to make the VirtualHost change we spoke of in the topic.

The default login for wolserver is "admin" and "admin"
The password to wake a computer is "wakemeup" (which is the same for if you want to put a computer to sleep. I was done being creative :D )

If a user wants to "Sleep-On-LAN" a Windows computer they will need to go to Jeremy Blum's page (http://www.jeremyblum.com/2013/07/14/rpi-wol-server/) and follow the instructions to enable php5-curl and install the SleepOnLan client (http://www.ireksoftware.com/SleepOnLan/) making sure it runs on boot.

*If you will start an Amahi Remote Wake-On-LAN Server Wiki I will write up the work.

Re: Remote Wake-On-LAN Server

Posted: Wed Jan 28, 2015 3:00 pm
by bigfoot65
Cool. I will be creating the app soon. We can then avoid most of the setup steps as they can be done in the app install script.

Recommend you document the work on the WOL wiki page. No need to create a new page in my opinion.

BTW, there are some shortcuts that will make the manual setup easier.

A. Use

Code: Select all

hda-create-db-and-user wolserver
to create the database and associated MySQL user.

B. To load the SQL into the database, do

Code: Select all

mysql -uwolserver -pwolserver wolserver < /path/to/sql
C. Recommend you set the database credentials in common.php to wolserver for both username and password in the source code. This should be the default. Then no need to edit this file.

Almost forgot to say great job!! This will be quite useful for the Amahi community. Once we get the app created, hope to test it and release LIVE.

Re: Remote Wake-On-LAN Server

Posted: Wed Jan 28, 2015 7:02 pm
by rdagijones
Just changed the common.php file to reflect your suggestion. Now it should be set to package. I may take some time to dress up some of the pages that I added, but that can come along even after it is live. Feel free to adjust some of the look too, if you wish.

Re: Remote Wake-On-LAN Server

Posted: Wed Jan 28, 2015 7:14 pm
by bigfoot65
Sounds good.

I will package it as soon as the package wizard is fixed. It's currently broken, so I cannot package any apps :(

Do you have any screen shots of how it looks with the new pages? I presume they are PHP.

Re: Remote Wake-On-LAN Server

Posted: Thu Jan 29, 2015 5:29 pm
by rdagijones
Yes, the new pages are also php. I can make some screenshots. I have a friend that is much better at html and he is going to help me standardize the look of each of the pages. The script examples that I started with for different components had different looks. I want them to blend better.

Re: Remote Wake-On-LAN Server

Posted: Thu Jan 29, 2015 7:00 pm
by bigfoot65
The Wake-On-LAN Server app has been created and you have access.

I see your point about the look. Things need to be moved over off the left side. Also think that the " is sleeping" message needs to not be displayed until you select a device. Otherwise is says "SELECT is sleeping" which is awkward.

Would be nice to add some color, borders, or something to dress it up. It is functional, but would be good to spruce it up a bit. I can try to help if needed. I have dabbled in PHP a bit myself. You can see my work via the Amahi Mail System in the wiki.

I created most of the PHP files and also a nice display with buttons that works well. Might be able to reuse the code for this project.

BTW if you want to see some screen shots of the mail app, check them out here.

Re: Remote Wake-On-LAN Server

Posted: Mon Feb 02, 2015 10:08 am
by rdagijones
With the help of a friend who knows html, I have cleaned it up a bit. A few questions:

1. Could you repackage the updated version?
2. Do the files need to be moved to the Amahi github page?
3. I would like to test out the install on a few servers that I maintain for some non-profits. Could you make them available to those accounts? What username or email or what do you need for those accounts. I can P.M. you that information.

Re: Remote Wake-On-LAN Server

Posted: Mon Feb 02, 2015 2:57 pm
by bigfoot65
1. Could you repackage the updated version?
Done.
2. Do the files need to be moved to the Amahi github page?
Not required, but might be a good idea. Recommend you check with cpg on that one. Catch him on IRC.
3. I would like to test out the install on a few servers that I maintain for some non-profits. Could you make them available to those accounts?
Yes PM me their amahi.org user names.

Re: Remote Wake-On-LAN Server

Posted: Tue Feb 03, 2015 8:05 am
by thegillion
Happy to join in on this topic. I have updated the github files with the credits and edited the wol page to not show the "SELECT is presently asleep" If we can get the app updated that would be great.

Re: Remote Wake-On-LAN Server

Posted: Tue Feb 03, 2015 2:36 pm
by bigfoot65
Done.