Coder Social home page Coder Social logo

@reb about sleep-on-lan HOT 2 CLOSED

sr-g avatar sr-g commented on July 17, 2024
@reb

from sleep-on-lan.

Comments (2)

SR-G avatar SR-G commented on July 17, 2024

I really don't know.

I just made a try on my side (alpine docker container 3.7 + supervisord) with this configuration and everything seems to be working fine.

Configuration in /etc/supervisor.d/sleep-on-lan.ini :

[program:sleep-on-lan] 
command=/go/bin/sol 
stdout_logfile =/var/log/supervisord_sleep-on-lan.log
redirect_stderr=true

Test done through :

curl localhost:8009/sleep
<?xml version="1.0" encoding="UTF-8"?>
<result>
  <operation>sleep</operation>
  <successful>true</successful>
</result>

Result in /var/log/supervisord_sleep-on-lan.log is :

INFO: 2017/11/26 12:24:23 listener_udp.go:12: Now listening UDP packets on port [9]
INFO: 2017/11/26 12:24:47 listener_http.go:138: Executing [sleep]
INFO: 2017/11/26 12:24:47 sleeper_linux.go:10: Executing operation [sleep], type [pm-suspend], command [pm-suspend]
INFO: 2017/11/26 12:24:47 sleeper_linux.go:21: Sleep implementation [linux], sleep command is [pm-suspend]
ERROR: 2017/11/26 12:24:47 sleeper_linux.go:24: Can't execute command [pm-suspend] : exec: "pm-suspend": executable file not found in $PATH

(expected error as i don't have the pm-suspend command installed in this test container)

you should test again with supervisord logs configured to see what's going on. Either the command is not correctly executed (path error, and so on), either the pm-suspend is not working as expected when executed through a supervisor sub-process (but i don't see any reason for this not to be working).

from sleep-on-lan.

supereggbert avatar supereggbert commented on July 17, 2024

Thanks, just done some more digging and I think I found the issue, in case anyone else has problem; it seems to be working but takes a couple of additional minutes after SOL has launched. Just a guess but supervisor may be starting the server before acpid is up and running.

from sleep-on-lan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.