Major usability improvements. Add config, DEB make, systemd unit, arg and flags parser.

This commit is contained in:
Alexandr Bogomyakov
2020-04-26 03:17:03 +03:00
parent 9d8c079a36
commit 416d50fd89
8 changed files with 217 additions and 75 deletions
+12
View File
@@ -0,0 +1,12 @@
---
server: https://mus.test.com
mountpoint: /srv/mus-fuse
http_user: username
http_pass: passwd1337
# How many KiB of file beginnings download and store in RAM.
# It's speeding up any metadata operations and media library scanning.
cache_head: 768
# How many count of `cache_head` store.
cache_max_count: 10
+13
View File
@@ -0,0 +1,13 @@
[Unit]
Description=Mount mus-fuse
[Service]
Type=simple
User=mus-fuse
RestartSec=5
Restart=always
ExecStart=/usr/bin/mus-fuse --config /etc/mus-fuse.yml
KillSignal=SIGINT
[Install]
WantedBy=default.target
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
systemctl daemon-reload
Executable
+10
View File
@@ -0,0 +1,10 @@
#!/bin/bash
if systemctl | grep -Fq 'mus-fuse'; then
sudo systemctl stop mus-fuse.service
fi
adduser --quiet --system --group --no-create-home --home /run/mus-fuse mus-fuse
mkdir -p /srv/mus-fuse
chown mus-fuse:mus-fuse /srv/mus-fuse