Permalink
Find file Copy path
168a812 Dec 31, 2018
1 contributor

Users who have contributed to this file

58 lines (48 sloc) 1.78 KB
#!/bin/sh
#
# @license http://www.gnu.org/licenses/gpl.html GPL Version 3
# @author Volker Theile <volker.theile@openmediavault.org>
# @author OpenMediaVault Plugin Developers <plugins@omv-extras.org>
# @copyright Copyright (c) 2009-2013 Volker Theile
# @copyright Copyright (c) 2013-2019 OpenMediaVault Plugin Developers
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
set -e
. /etc/default/openmediavault
. /usr/share/openmediavault/scripts/helper-functions
case "$1" in
configure)
if [ -z "${2}" ]; then
deb-systemd-helper disable minidlna.service >/dev/null || true
deb-systemd-invoke stop minidlna.service >/dev/null || true
fi
# Activate package triggers.
dpkg-trigger update-fixperms
dpkg-trigger update-locale
# Initialize and migrate configuration database.
echo "Updating configuration database ..."
omv-confdbadm create "conf.service.minidlna"
if [ -n "$2" ]; then
omv-confdbadm migrate "conf.service.minidlna" "${2}"
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument '$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0