#! /bin/sh set -e # Stop Libresonic service. if [ -e /etc/init.d/libresonic ]; then invoke-rc.d libresonic stop fi # Backup database. if [ -e /var/libresonic/db ]; then rm -rf /var/libresonic/db.backup cp -R /var/libresonic/db /var/libresonic/db.backup fi