[DOC] fix userrights instructions and add update to INSTALL.md (#88)
This commit is contained in:
parent
db0aa25cf8
commit
bf2a026b89
19
INSTALL.md
19
INSTALL.md
@ -10,7 +10,7 @@ rm go1.8.linux-amd64.tar.gz
|
||||
```
|
||||
|
||||
### Configure go
|
||||
Add these lines in your root shell startup file (i.e. `/root/.bashrc`):
|
||||
Add these lines in your root shell startup file (e.g. `/root/.bashrc`):
|
||||
```sh
|
||||
export GOPATH=/opt/go
|
||||
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
|
||||
@ -42,10 +42,12 @@ cp /opt/go/src/github.com/FreifunkBremen/yanic/config_example.toml /etc/yanic.co
|
||||
For an easy startup you only need to edit the `interfaces` in section
|
||||
`[respondd]` in file `/etc/yanic.conf`.
|
||||
|
||||
Then create the following folders:
|
||||
Then create the following files and folders:
|
||||
```sh
|
||||
mkdir -p /var/lib/yanic
|
||||
mkdir -p /var/www/html/meshviewer/data
|
||||
touch /var/log/yanic.log
|
||||
chown yanic /var/log/yanic.log /var/lib/yanic /var/www/html/meshviewer/data
|
||||
```
|
||||
|
||||
#### Standalone
|
||||
@ -62,9 +64,20 @@ the same directory as the `dataPath`. Change the path in the section
|
||||
`[[nodes.output.meshviewer]]` accordingly.
|
||||
|
||||
### Service
|
||||
```bash
|
||||
```sh
|
||||
cp /opt/go/src/github.com/FreifunkBremen/yanic/contrib/init/linux-systemd/yanic.service /lib/systemd/system/
|
||||
systemctl daemon-reload
|
||||
systemctl start yanic
|
||||
systemctl enable yanic
|
||||
```
|
||||
|
||||
### Update
|
||||
For an update just stop yanic and then call the same `go` command again (again as root):
|
||||
```sh
|
||||
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:
|
||||
```sh
|
||||
diff /opt/go/src/github.com/FreifunkBremen/yanic/config_example.toml /etc/yanic.conf
|
||||
```
|
||||
|
@ -5,8 +5,8 @@ enable = true
|
||||
synchronize = "1m"
|
||||
# how often request per multicast
|
||||
collect_interval = "1m"
|
||||
# on which interface
|
||||
interfaces = ["eth0"]
|
||||
# interface that has an IP in your mesh network
|
||||
interfaces = ["br-ffhb"]
|
||||
# define a port to listen
|
||||
# if not set or set to 0 the kernel will use a random free port at its own
|
||||
#port = 10001
|
||||
|
@ -15,7 +15,7 @@ func TestReadConfig(t *testing.T) {
|
||||
assert.NotNil(config)
|
||||
|
||||
assert.True(config.Respondd.Enable)
|
||||
assert.Equal([]string{"eth0"}, config.Respondd.Interfaces)
|
||||
assert.Equal([]string{"br-ffhb"}, config.Respondd.Interfaces)
|
||||
assert.Equal(time.Minute, config.Respondd.CollectInterval.Duration)
|
||||
|
||||
assert.Equal(time.Hour*24*7, config.Nodes.PruneAfter.Duration)
|
||||
|
Loading…
Reference in New Issue
Block a user