From 0aaccb9e8f405a1987188bafcf09cd0c54f89d66 Mon Sep 17 00:00:00 2001 From: XeonSquared Date: Thu, 24 Oct 2019 02:01:25 +1100 Subject: [PATCH] added documentation for WoLBeacon, fixed the config file path --- WoLBeacon/OpenOS/README.md | 1 + WoLBeacon/OpenOS/etc/rc.d/wolbeacon.lua | 4 ++-- WoLBeacon/OpenOS/usr/man/wolbeacon | 27 +++++++++++++++++++++++++ WoLBeacon/README.md | 9 +++++++++ programs.cfg | 1 + 5 files changed, 40 insertions(+), 2 deletions(-) create mode 120000 WoLBeacon/OpenOS/README.md create mode 100644 WoLBeacon/OpenOS/usr/man/wolbeacon create mode 100644 WoLBeacon/README.md diff --git a/WoLBeacon/OpenOS/README.md b/WoLBeacon/OpenOS/README.md new file mode 120000 index 0000000..d90d899 --- /dev/null +++ b/WoLBeacon/OpenOS/README.md @@ -0,0 +1 @@ +usr/man/wolbeacon \ No newline at end of file diff --git a/WoLBeacon/OpenOS/etc/rc.d/wolbeacon.lua b/WoLBeacon/OpenOS/etc/rc.d/wolbeacon.lua index f7a636b..d1e4da8 100644 --- a/WoLBeacon/OpenOS/etc/rc.d/wolbeacon.lua +++ b/WoLBeacon/OpenOS/etc/rc.d/wolbeacon.lua @@ -12,7 +12,7 @@ cfg.port = 3442 cfg.message = "WoLBeacon" local function saveConfig() - local f = io.open("/etc/wolbeacon.lua","wb") + local f = io.open("/etc/wolbeacon.cfg","wb") if not f then return false end @@ -27,7 +27,7 @@ local function broadcast() end local function loadConfig() - local f = io.open("/etc/wolbeacon.lua","rb") + local f = io.open("/etc/wolbeacon.cfg","rb") if not f then saveConfig() return false diff --git a/WoLBeacon/OpenOS/usr/man/wolbeacon b/WoLBeacon/OpenOS/usr/man/wolbeacon new file mode 100644 index 0000000..f47624d --- /dev/null +++ b/WoLBeacon/OpenOS/usr/man/wolbeacon @@ -0,0 +1,27 @@ +# WoLBeacon for OpenOS + +WoLBeacon is an OpenOS rc daemon to wake other machines up, and make sure yours can be woken up. + +## Usage + +WoLBeacon can be managed as an rc service: + +``` +rc wolbeacon start +rc wolbeacon stop +rc wolbeacon reload +rc wolbeacon enable +rc wolbeacon disable +``` + +You will most likely want to start and enable the service. + +## Configuration + +WoLBeacon's configuration file can be found in */etc/wolbeacon.cfg*, containing a number of fields: + +- **broadcast**: Whether to broadcast Wake-on-LAN packets. +- **receive**: Whether to configure the local network interfaces to receive Wake-on-LAN messages. +- **message**: The Wake-on-LAN message to listen for and broadcast. +- **port**: The port to broadcast Wake-on-LAN messages on. +- **delay**: The interval between sending Wake-on-LAN messages. diff --git a/WoLBeacon/README.md b/WoLBeacon/README.md new file mode 100644 index 0000000..ef470e4 --- /dev/null +++ b/WoLBeacon/README.md @@ -0,0 +1,9 @@ +# WoLBeacon + +WoLBeacon is a piece of software written to wake other computers up, and keep them awake, like force-feeding your friends coffee. + +This is achieved by both setting the wake message for the local machine, and broadcasting wake-on-LAN messages at regular intervals. + +## [WoLBeacon for OpenOS](OpenOS/) + +WoLBeacon is implemented as an rc daemon for OpenOS. diff --git a/programs.cfg b/programs.cfg index 504fe8e..97fcc71 100644 --- a/programs.cfg +++ b/programs.cfg @@ -131,6 +131,7 @@ ["wolbeacon"] = { files = { ["master/WoLBeacon/OpenOS/etc/rc.d/wolbeacon.lua"] = "//etc/rc.d", + ["master/WoLBeacon/OpenOS/usr/man/wolbeacon"] = "/man", }, name = "WoL Beacon", description = "Wake on LAN daemon",