Code: Select all
#!/bin/bash
export MYSQL_PWD=password
nice -n +19 mysqldump -uusername --no-data --databases netjukebox > /tmp/netjukebox.sql
nice -n +19 mysqldump -uusername --no-create-info --ignore-table=netjukebox.track --ignore-table=netjukebox.bitmap --ignore-table=netjukebox.country_ipv4 --ignore-table=netjukebox.country_ipv6 netjukebox >> /tmp/netjukebox.sql
echo "UPDATE \`server\` SET \`value\` = '0' WHERE \`name\` = 'geolite2_version' LIMIT 1;" >> /tmp/netjukebox.sql
nice -n +19 gzip -f /tmp/netjukebox.sql
mv -f /tmp/netjukebox.sql.gz /BACKUP_LOCATION/netjukebox.sql.gz
Improve Music Player Daemon update speed
For netjukebox there is no need to read the metadata.
To improve MPD update speed metadata can be disabled.
Update /etc/mpd.conf with:
Code: Select all
metadata_to_use "none"
Music Player Daemon SPDIF output
With Ubuntu Server I had a hard time to get SPDIF output working.
Here is the solution I found on http://mpd.wikia.com/wiki/Alsa#ALSA_sel ... perfect.29.
Update /etc/mpd.conf with:
Code: Select all
audio_output {
type "alsa"
name "SPDIF"
device "cards.pcm.iec958"
}
Code: Select all
aplay -L