Using your favorite text editor, change the destination IP and Port to whatever works for you. This is defined on line 235 in client.go as 127.0.0.1:1300.
Now the server file needs to be run on the preferred port, as specified in the client file. This is defined on line 218 in server.go.
The binary(s) can be obtained using the makefile
If the server is being run on a separate machine, only run make with client flag
``` sh
make client
```
If both binaries are being run on the same machine, make all will suffice. Although, both of these commands can be bypassed with ```go build```, as this is all ```make``` does anyway.
``` sh
make all
```
The client binary needs to run on login, the directory on the Raspberry Pi where these scripts go is ```/etc/update-motd.d/```.
The server binary and complementary script need to be running at all times. Should they be run on a distinct machine, this is also the time to move them.
``` sh
scp server.go user@ip:~/path/to/file/
scp server-run.sh user@ip:~/path/to/file/
```
On that machine, the server will need to be compiled, so the makefile can be copied with ```scp``` just the same, or compiled using ```go build```.
From there, on the server machine, to avoid inconvenient server crashes, move the server script, just like the client script.
This installation method requires the user to be logged in at all times, and will run multiple instances should the same user log in multiple times, so it is recommended to have a either have a main user that never logs out, or a dummy user that auto-logs in on reboot. (If someone knows a better way to have one instance of the software always run, please let me know)
Finally done!
### Usage
The client uses the following flags
``` sh
-h - display help message
-a <s> - adds required argument <s> as a quote to server
-l - list all quotes
-r [i] - remove; may be run with or without argument
-v - verbose usage, prints a lot of stuff that may not be all that useful
-d - specify alternate server destination
-log - [NOT YET IMPLEMENTED] gets logfile from server (contains use and error histories)