ex0nuss / Remote-Wake-Sleep-On-LAN-Docker

A docker image of sciguy14/Remote-Wake-Sleep-On-LAN-Server
GNU General Public License v3.0
33 stars 16 forks source link

Sleep function doesn't work #8

Open kabelklaus opened 2 years ago

kabelklaus commented 2 years ago

Hey,

I would like to use the sleep function for my Open Media Vault NAS system. But it doesn't work. Is it necessary to active the sleep function on my omv system like WoL or is it a simple command like "shutdown now"?

Best wishes

cfuchs12345 commented 1 year ago

Hi, had the same issue. You need to install something like this on your server to trigger a sleep command. https://github.com/SR-G/sleep-on-lan I mapped "shutdown" as command to "shutdown -h" on my linux server.

The bigger problem is that this docker image doesn't have php curl installed and also disabled in the php.ini. Even if you install the above mentioned service on your linux remote server, the curl command of the php site doesn't work.

There is the following error in the apache2 error log PHP Fatal error:
Uncaught Error: Call to undefined function curl_init()

I fixed it for me by executing following commands after starting the container - in my case with docker-compose "docker-compose up -d" (note "frontend-rwsols" is the name of the container)

docker exec frontend-rwsols apt update
docker exec frontend-rwsols apt install php7.4-curl
docker exec frontend-rwsols sed -i 's/;extension=curl/extension=curl/g' /etc/php/7.4/apache2/php.ini
docker-compose restart

Would be nice, if the curl extension could be installed/activated in this docker image out of the box.

cfuchs12345 commented 1 year ago

Thanks ex0nuss for creating this image.

I created a fork based on a new Ubuntu/PHP version and the latest codebase of the referenced GitHub repo.

Sleep should hopefully work with my new build here: https://hub.docker.com/r/afoxdocker/remote-wake-sleep-on-lan-docker