added systemd instructions
This commit is contained in:
44
README.md
44
README.md
@@ -70,6 +70,50 @@ services:
|
||||
|
||||
then start with `docker-compose up -d`
|
||||
|
||||
**Installation with systemd** (on ubuntu 18.04)
|
||||
|
||||
Prerequisites:
|
||||
|
||||
```bash
|
||||
Add a repository with the latest Version of golang and install the prerequisites:
|
||||
sudo add-apt-repository ppa:longsleep/golang-backports
|
||||
sudo apt update && sudo apt upgrade
|
||||
sudo apt install build-essential git sqlite libtag1-dev ffmpeg libasound-dev golang
|
||||
```
|
||||
|
||||
Download and compile gonic in the home directory
|
||||
|
||||
```bash
|
||||
go get go.senan.xyz/gonic/cmd/gonic
|
||||
```
|
||||
|
||||
Add a gonic user and create a directory for the server:
|
||||
|
||||
```bash
|
||||
sudo mkdir -p /var/gonic/
|
||||
sudo adduser --disabled-login --gecos "" gonic
|
||||
sudo mv go/bin/gonic /var/gonic/
|
||||
sudo wget https://raw.githubusercontent.com/sentriz/gonic/master/contrib/config -O /var/gonic/config
|
||||
sudo chmod -R 750 /var/gonic/
|
||||
sudo chown -R gonic:gonic /var/gonic/
|
||||
```
|
||||
|
||||
Add your music-path to the config file
|
||||
|
||||
```bash
|
||||
sudo nano /var/gonic/config
|
||||
```
|
||||
|
||||
Setup systemd service:
|
||||
|
||||
```bash
|
||||
sudo wget https://raw.githubusercontent.com/sentriz/gonic/master/contrib/gonic.service -O /etc/systemd/system/gonic.service
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now gonic
|
||||
```
|
||||
|
||||
|
||||
|
||||
## configuration options
|
||||
|
||||
|env var|command line arg|description|
|
||||
|
||||
Reference in New Issue
Block a user