Skip to content

Build and Installation

go

Install

1
2
3
4
cd /usr/local/
wget https://dl.google.com/go/go1.13.1.linux-amd64.tar.gz -O go-release-linux-amd64.tar.gz
tar xvf go-release-linux-amd64.tar.gz
rm go-release-linux-amd64.tar.gz

Configure go

Add these lines in your root shell startup file (e.g. /root/.bashrc):

export GOPATH=/opt/go
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin

Yanic

Compile

As root:

go install github.com/FreifunkBremen/yanic@latest

or to install a different checkout for example for development run:

1
2
3
git clone https://github.com/FreifunkBremen/yanic
cd yanic
go install .

Install

cp /opt/go/src/github.com/FreifunkBremen/yanic/contrib/init/linux-systemd/yanic.service /lib/systemd/system/yanic.service
systemctl daemon-reload

Before start, you should configure yanic by the file /etc/yanic.conf:

systemctl start yanic

Enable to start on boot:

systemctl enable yanic

Update

For an update just stop yanic and then call the same go command again (again as root):

systemctl stop yanic
go get -v -u github.com/FreifunkBremen/yanic
Then update the config file, for example look at the diff with the new example:
diff /opt/go/src/github.com/FreifunkBremen/yanic/config_example.toml /etc/yanic.conf