GithubHelp home page GithubHelp logo

go-wol's People

Contributors

creekorful avatar gnanderson avatar mattn avatar mengzhuo avatar sabhiram avatar traetox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

go-wol's Issues

Use Github actions

Do you consider changing your CI for Github Actions? It's free and much faster than Travis CI.

I can manage the refactoring by doing a PR if you are interested.

Install command update

$go get github.com/sabhiram/go-wol

should be replaced by

$go install github.com/sabhiram/go-wol/cmd/wol

custom location for bolt.db, make it text based or make it less frequently updated

First of all, wol is a great and reliable tool. Thanks for the work!

My $HOME/.config path is version controlled, as a backup/restore mechanism for all my linux machines.

Whenever I use wol it changes bold.db and thus causing the git status to change. I don't know what's changed, and it's chaning so often.

Can you allow custom location for bolt.db, make it text based or make it less frequently updated?

Thanks!

Doesn't seems to work on 32bits ARM

It compiles ok on ARMv7 32bits (Beaglebone Black), tests runs ok, but for some reason, the magic packet doesn't wake my server.

Doing the same process in a 64bits computer it works fine but on ARM nothing happens...


$wol MYSERVER
Attempting to send a magic packet to MAC XX:XX:XX:XX:XX:XX
... Broadcasting to: 255.255.255.255:9
Magic packet sent successfully to XX:XX:XX:XX:XX:XX
$go test -v github.com/sabhiram/go-wol/...
=== RUN   TestNewMagicPacket
--- PASS: TestNewMagicPacket (0.00s)
=== RUN   TestNewMagicPacketNegative
--- PASS: TestNewMagicPacketNegative (0.00s)
=== RUN   TestMagicPacketMarshal
--- PASS: TestMagicPacketMarshal (0.00s)
PASS
ok  	github.com/sabhiram/go-wol	0.041s
=== RUN   TestDecodeToMacIface
--- PASS: TestDecodeToMacIface (0.00s)
=== RUN   TestEncodeFromMacIface
--- PASS: TestEncodeFromMacIface (0.00s)
=== RUN   TestRunAllSuites
=== RUN   TestAddAlias
--- PASS: TestAddAlias (0.11s)
=== RUN   TestAddDuplicateAlias
--- PASS: TestAddDuplicateAlias (0.07s)
=== RUN   TestDeleteAlias
--- PASS: TestDeleteAlias (0.10s)
=== RUN   TestGetAlias
--- PASS: TestGetAlias (0.09s)
--- PASS: TestRunAllSuites (0.39s)
=== RUN   TestIPFromInterface
--- PASS: TestIPFromInterface (0.00s)
=== RUN   TestIPFromInterfaceNegative
--- PASS: TestIPFromInterfaceNegative (0.00s)
PASS
ok  	github.com/sabhiram/go-wol/cmd/wol	0.446s

go-wol has stopped working

Having used this WOL tool successfully for quite a long time now out of the blue it has stopped working and I can't figure out why.

I run the command from a shortcut on my desktop that links too.

C:\Users\me\Documents\wol_windows_amd64.exe wake 1c:6f:65:xx:xx:xx

Which provides the response

Attempting to send a magic packet to MAC 1c:6f:65:xx:xx:xx
... Broadcasting to: 255.255.255.255:9
Magic packet sent successfully to 1c:6f:65:xx:xx:xx

But the device doesn't wake.

I am certain everything is set up correctly as triggering the WOL packet from pfsense works as expected.

Have you got any pointers / things to check?

Failed to open WOL DB

I think wol should create a init db if user aliases is not found

./wol -h
Failed to open WOL DB: open /Users/zhuo/.config/go-wol/bolt.db: no such file or directory
panic: Unable to load user aliases! Exiting...

goroutine 1 [running]:
panic(0x1d88e0, 0xc82000ef10)
/usr/local/Cellar/go/1.6.2/libexec/src/runtime/panic.go:481 +0x3e6
main.main()
/Users/zhuo/src/github.com/sabhiram/go-wol/cmd/wol/

Support mips/mips64

Original BoltDB doesn't have support of mips arch, CoreOS maintained fork does and I'd like to use this on some gear with that architecture.

How to run wol?

I'm a beginner.
I get wol by 'go get github.com/sabhiram/go-wol/cmd/wol',
but
image

Executing the function

I have a web server (raspberry pi) which has an endpoint (ex: /start ). When I hit this endpoint, I want it to send a magic packet or wake command to a computer in its private network.
Issue is, I can not understand how to call this program from the web server. Only way I can think of right now is to install the go-wol in raspberry pi and then use exec.Command to call the go-wol.
Is it possible to use go-wol from the web server without the above process? or modifying the wol code?

note: When I do go build I want it work right out of the box without any dependencies.

colorized help

Just started using this tool, so far looks nice!!! Thanks.

Would you be interested in making some changes so the help output is only colorized when sdout is a TTY?

I was on a small little laptop and the help/usage info wrapped off the top of the screen. Sadly "wol | less" was hard to read because of the escape codes, such as:

  • ESC[36mwolESC[0m [] ESC[33mwakeESC[0m <mac address | alias>

To fix example:

  • if unix.IoctlGetTermios(int(STDOUT), unix.TIOCGETA)
    colorize
    else
    strip colorize

Not sure how portable your code is, if you are looking for more portable code you could use something like:
https://github.com/mattn/go-isatty

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.