Skip to content

Commit

Permalink
*: modernize, switch to builds.sr.ht
Browse files Browse the repository at this point in the history
  • Loading branch information
mdlayher committed Apr 19, 2019
1 parent 8561b2e commit a14e73a
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 20 deletions.
16 changes: 16 additions & 0 deletions .builds/freebsd.yml
@@ -0,0 +1,16 @@
image: freebsd/latest
packages:
- go
sources:
- https://github.com/mdlayher/wol
environment:
GO111MODULE: "on"
tasks:
- build: |
go version
go get golang.org/x/lint/golint
go get honnef.co/go/tools/cmd/staticcheck
cd wol/
/home/build/go/bin/staticcheck ./...
/home/build/go/bin/golint -set_exit_status ./...
go test -v -race ./...
16 changes: 16 additions & 0 deletions .builds/linux.yml
@@ -0,0 +1,16 @@
image: archlinux
packages:
- go
sources:
- https://github.com/mdlayher/wol
environment:
GO111MODULE: "on"
tasks:
- build: |
go version
go get golang.org/x/lint/golint
go get honnef.co/go/tools/cmd/staticcheck
cd wol/
/home/build/go/bin/staticcheck ./...
/home/build/go/bin/golint -set_exit_status ./...
go test -v -race ./...
10 changes: 5 additions & 5 deletions README.md
@@ -1,11 +1,11 @@
wol [![Build Status](https://travis-ci.org/mdlayher/wol.svg?branch=master)](https://travis-ci.org/mdlayher/wol) [![Coverage Status](https://coveralls.io/repos/mdlayher/wol/badge.svg?branch=master)](https://coveralls.io/r/mdlayher/wol?branch=master) [![GoDoc](http://godoc.org/github.com/mdlayher/wol?status.svg)](http://godoc.org/github.com/mdlayher/wol)
===
# wol [![builds.sr.ht status](https://builds.sr.ht/~mdlayher/wol.svg)](https://builds.sr.ht/~mdlayher/wol?) [![GoDoc](https://godoc.org/github.com/mdlayher/wol?status.svg)](https://godoc.org/github.com/mdlayher/wol) [![Go Report Card](https://goreportcard.com/badge/github.com/mdlayher/wol)](https://goreportcard.com/report/github.com/mdlayher/wol)

Package `wol` implements a Wake-on-LAN client. MIT Licensed.
Package `wol` implements a Wake-on-LAN client. MIT Licensed.

This package exposes two types, which operate slightly differently:

- `Client`: WoL client which uses UDP sockets to send magic packets
- `RawClient` WoL client which uses raw Ethernet sockets to send magic packets

For most use cases, the `Client` type will be sufficient. The `RawClient` type requires
elevated privileges (root user) and currently works with Linux only.
For most use cases, the `Client` type will be sufficient. The `RawClient` type
requires elevated privileges (root user) and works on Linux or *BSD/macOS only.
33 changes: 18 additions & 15 deletions cmd/wol/README.md
@@ -1,29 +1,32 @@
wol
===
# wol

Command `wol` is a simple Wake-on-LAN client. It can issue Wake-on-LAN magic
packets using both UDP or raw ethernet sockets.
packets using both UDP or Ethernet sockets.

Usage
-----
## Usage

```
```text
$ ./wol -h
Usage of ./wol:
-a="": network address for Wake-on-LAN magic packet
-i="": network interface to use to send Wake-on-LAN magic packet
-p="": optional password for Wake-on-LAN magic packet
-t="": target for Wake-on-LAN magic packet
-a string
network address for Wake-on-LAN magic packet
-i string
network interface to use to send Wake-on-LAN magic packet
-p string
optional password for Wake-on-LAN magic packet
-t string
target for Wake-on-LAN magic packet
```

Issue Wake-on-LAN magic packet using UDP network address:

```
$ ./wol -a 192.168.1.1:7 -t 00:12:7f:eb:6b:40
```text
./wol -a 192.168.1.1:7 -t 00:12:7f:eb:6b:40
```

Issue Wake-on-LAN magic packet using raw ethernet sockets (requires elevated
Issue Wake-on-LAN magic packet using Ethernet sockets (requires elevated
privileges):

```
$ sudo ./wol -i eth0 -t 00:12:7f:eb:6b:40
```text
sudo ./wol -i eth0 -t 00:12:7f:eb:6b:40
```

0 comments on commit a14e73a

Please sign in to comment.