dh1tw / remoteRotator

remoteRotator lets you expose a local antenna rotator (azimuth / elevation) to the network
MIT License
44 stars 5 forks source link

install remoteRotator in $GOPATH/bin? #16

Closed jmscott closed 3 years ago

jmscott commented 4 years ago

i notice that remoteRotator is not installed in $GOPATH/bin. is this intentional? seems natural to install in $GOPATH/bin. not critical issue, just means another step when upgrading code.

dh1tw commented 4 years ago

Hey @jmscott,

Go installs binaries only into $GOPATH/bin if you use go install. Running the go build command or remoteRotator's Makefile (recommended), creates the binary by default in the source directory. go build has the flag -o through which you could specify the name and location of the output.

The recommended way is to use the Makefile which will inject additional information like the current git-commit, build time/date and the semVer tag. You can see that information by executing ./remoteRotator version. Its quite handy to know which version of remoteRotator users are running when debugging problems 😜

On my production system, I copy the binary into /usr/local/bin and then have a systemd job that takes care of executing and monitoring the respective remoteRotator instance. I have one systemd job for each rotator. I store the config files in /etc/remoteRotator/tower1.toml, /etc/remoteRotator/tower2.toml etc. and then reference them in the systemd job. There is an article in the wiki on how to daemonize remoteRotator under Linux.