diff --git a/distros/debian8/zoneminder.config b/distros/debian8/zoneminder.config index 7e300f3db..04609d062 100644 --- a/distros/debian8/zoneminder.config +++ b/distros/debian8/zoneminder.config @@ -1,19 +1,20 @@ #!/bin/sh # config maintainer script for zoneminder -CONFIGFILE=/etc/zm/zm.conf - -set -e +set -x # Source the debconf stuff . /usr/share/debconf/confmodule +CONFIGFILE=/etc/zm/zm.conf + # Ask the user if debconf shall be used to configure the package +db_set zoneminder/debconf_install true db_input high zoneminder/debconf_install || true db_go || true -db_get zoneminder/debconf_install # Exit if the user didn't want to use debconf +db_get zoneminder/debconf_install if [ "$RET" = false ]; then exit 0 fi @@ -41,7 +42,6 @@ if [ "$ZM_DB_TYPE" = mysql ]; then fi if [ -f /usr/share/dbconfig-common/dpkg/config ]; then - # Set the first version in which dbconfig-common was introduced in the package dbc_first_version="1.28.0" diff --git a/distros/debian8/zoneminder.postinst b/distros/debian8/zoneminder.postinst index 79c7c2865..25781ad8b 100644 --- a/distros/debian8/zoneminder.postinst +++ b/distros/debian8/zoneminder.postinst @@ -1,9 +1,12 @@ #! /bin/sh # postinst maintainer script for zoneminder -CONFIGFILE=/etc/zm/zm.conf +set -x -set -e +# Source the debconf stuff +. /usr/share/debconf/confmodule + +CONFIGFILE=/etc/zm/zm.conf old_version=$2 @@ -39,9 +42,6 @@ mysql_install_admin() { dbc_mysql_exec_command "INSERT INTO Users (id, username, password) VALUES (1, '$ADMIN_LOGIN', '$md5_password');" || true } -# Source the debconf stuff -. /usr/share/debconf/confmodule - # Exit if user didn't want to use debconf db_get zoneminder/debconf_install if [ "$RET" = false ]; then