Use simpler file structure
This commit is contained in:
parent
8ea9414418
commit
d5ca1ac81d
74 changed files with 398 additions and 477 deletions
44
templates/mpd/mpd.j2
Normal file
44
templates/mpd/mpd.j2
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||
|
||||
music_directory "{{ mpd_music_dir }}"
|
||||
playlist_directory "{{ mpd_playlist_dir }}"
|
||||
state_file "{{ mpd_state_path }}"
|
||||
sticker_file "{{ mpd_sticker_path }}"
|
||||
log_level "secure"
|
||||
|
||||
bind_to_address "{{ mpd_listen_address }}"
|
||||
port "{{ mpd_listen_port }}"
|
||||
|
||||
auto_update "yes"
|
||||
filesystem_charset "UTF-8"
|
||||
|
||||
samplerate_converter "1"
|
||||
|
||||
database {
|
||||
plugin "proxy"
|
||||
host "{{ mpd_database_address }}"
|
||||
port "{{ mpd_database_port }}"
|
||||
}
|
||||
|
||||
audio_output {
|
||||
type "pulse"
|
||||
name "mpd"
|
||||
replay_gain_handler "software"
|
||||
mixer_type "hardware"
|
||||
format "96000:24:1"
|
||||
}
|
||||
|
||||
input {
|
||||
enabled "no"
|
||||
plugin "tidal"
|
||||
}
|
||||
|
||||
input {
|
||||
enabled "no"
|
||||
plugin "qobuz"
|
||||
}
|
||||
|
||||
decoder {
|
||||
plugin "wildmidi"
|
||||
enabled "no"
|
||||
}
|
||||
5
templates/mpd/music_mount.j2
Normal file
5
templates/mpd/music_mount.j2
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||
|
||||
sudo mount -t nfs -o vers=4,soft,async,proto=tcp,port=2049 10.8.0.1:/srv/nfs4/music {{ mpd_music_dir }}
|
||||
6
templates/mpd/music_umount.j2
Normal file
6
templates/mpd/music_umount.j2
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||
|
||||
pkill cantata
|
||||
sudo umount {{ mpd_music_dir }}
|
||||
14
templates/mpd/service.j2
Normal file
14
templates/mpd/service.j2
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||
|
||||
[Unit]
|
||||
Description=Music Player Daemon
|
||||
Documentation=man:mpd(1) man:mpd.conf(5)
|
||||
|
||||
[Service]
|
||||
Type=notify
|
||||
ExecStartPre={{ xdg_script_dir }}/music_mount
|
||||
ExecStart=/usr/bin/mpd --no-daemon {{ mpd_configuration_dir }}/mpd.conf
|
||||
ExecStopPost={{ xdg_script_dir }}/music_umount
|
||||
Restart=on-failure
|
||||
RestartSec=15s
|
||||
TimeoutStopSec=3
|
||||
11
templates/mpd/socket.j2
Normal file
11
templates/mpd/socket.j2
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
# {{ ansible_managed }} {{ ansible_date_time.time }} {{ ansible_date_time.date }}
|
||||
|
||||
[Socket]
|
||||
ListenStream=/run/user/1000/mpd.socket
|
||||
ListenStream={{ mpd_listen_port }}
|
||||
Backlog=5
|
||||
KeepAlive=true
|
||||
PassCredentials=true
|
||||
|
||||
[Install]
|
||||
WantedBy=sockets.target
|
||||
Loading…
Add table
Add a link
Reference in a new issue