Files
ekho/README.md
T

87 lines
3.1 KiB
Markdown
Raw Normal View History

2023-10-03 13:09:13 -04:00
# ekho
2023-10-06 12:53:45 -04:00
##### _Needlessly Networked MOTD generator_
2023-10-04 12:22:07 -04:00
## Why?
To test my abilities to develop networked programs, and to enhance my skills in writing such.
## Requirements
2023-10-04 12:22:07 -04:00
### Hardware
- Client machine
- Server machine (not required to be distinct from Client)
2023-10-04 12:22:07 -04:00
### Software
- Tested with [golang] v1.26
- Installation has only been tested with [just] v1.53
- Server installation assumes systemd (tested with v260.2)
2023-10-04 12:22:07 -04:00
### Installation
Clone the repo
``` sh
git clone https://github.com/alexander-the-alright/ekho
cd ekho
```
#### Justfile
It is recommended to use ```just``` for installation, as it has more
capabilities than ```make```, however, there is a makefile included.
To install the server with ```just```, run ```sudo just ins_server```.
You will be prompted to enter a new port number to run the server on (
or leave blank to use 1300). The port will be changed in the source
file before compilation.
To install the client with ```just```, run ```sudo just ins_client```.
You will be prompted to enter the IP (or URL) and port of the server
(or leave blank to use localhost:1300). The IP/URL and port will be
changed in the source file before compilation.
2023-10-04 12:22:07 -04:00
#### Makefile
If you are unable or willing to use ```just```, the included makefile
still has most of the functionality, but it does not change any
important parameters. The following changes are advised before
installation.
2023-10-04 12:22:07 -04:00
1. On the client machine, change the IP/URL and port in the client source file. This can be
done quickly with ```sed -i -e "s/127.0.0.1:1300/YOUR.IP.GOES.HERE:PORT/" client.go```
2. On the server machine, change the port in the server source file. This can be done with a
similar command: ```sed -i -e "s/1300/PORT/" server.go```. (note: this
should match the port from bullet 1)
3. On the server machine, change the user referenced in the systemd service file. This can be
done with another sed command, ```sed -e -i "s/USER/YOUR_USERNAME/" ekho.service```
2023-10-05 23:50:36 -04:00
After making these changes on the respective machines, run either
```sudo make ins_client``` or ```sudo make ins_server``` to compile and install the client
and/or server binaries.
#### After Installation
After installation of the server binary, systemd will display the
status of the new service. It should be ```enabled``` and
```running```.
2023-10-04 12:22:07 -04:00
Finally done!
2023-10-04 12:22:07 -04:00
### Usage
The client uses the following flags
``` sh
-h - display help message
-a <string> - adds required argument <s> as a quote to server
-ip <ip:port> - specify alternate server destination
-l - list all quotes
-r [i] - remove; may be run with or without argument
-s <i> - specify the size of the receipt buffer
2024-06-14 17:56:44 -04:00
```
The server uses the following flags
``` sh
-h - display help message
-s <i> - specify the size of the receipt buffer
-v - display version and exit
-vv - display version and about info and exit
2023-10-04 12:22:07 -04:00
```
2023-11-16 10:25:57 -05:00
### To Be Implemented
- Log all uses/transaction data each day
- Request, send, and receive the logfile
2023-11-16 10:25:57 -05:00
- User-specific quotes/quotefiles
- Colored printing and coloring quotes
- Edit quotes
2024-03-26 22:48:21 -04:00
2023-10-04 12:22:07 -04:00
[golang]: <https://go.dev/doc/install>
[just]: <https://github.com/casey/just>