mirror of
https://github.com/house-of-vanity/mus-fuse.git
synced 2025-07-06 21:24:09 +00:00
Major usability improvements. Add config, DEB make, systemd unit, arg and flags parser.
This commit is contained in:
12
assets/conf.yml
Normal file
12
assets/conf.yml
Normal 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
assets/mus-fuse.service
Normal file
13
assets/mus-fuse.service
Normal 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
assets/postinst
Executable file
3
assets/postinst
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
systemctl daemon-reload
|
10
assets/preinst
Executable file
10
assets/preinst
Executable 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
|
||||
|
Reference in New Issue
Block a user