diff --git a/dist/debian/arsse.config b/dist/debian/arsse.config index 3ee1beb8..6839c26b 100644 --- a/dist/debian/arsse.config +++ b/dist/debian/arsse.config @@ -4,15 +4,13 @@ set -e . /usr/share/debconf/confmodule -# Settings for dbconfig-common -dbc_authmethod_user=password -dbc_dbtypes="sqlite3, pgsql, mysql" - -# Do dbconfig-common magic +# Set up dbconfig-common if test -f /usr/share/dbconfig-common/dpkg/config; then - . /usr/share/dbconfig-common/dpkg/config - dbc_go arsse "$@" + . /usr/share/dbconfig-common/dpkg/config + dbc_dbtypes="sqlite3, pgsql, mysql" + dbc_authmethod_user="password" + dbc_go arsse "$@" fi -# Ask all the questions +# Prompt for dbconfig-common configuration db_go || true diff --git a/dist/debian/arsse.postinst b/dist/debian/arsse.postinst index 75a97af7..4b3bf172 100644 --- a/dist/debian/arsse.postinst +++ b/dist/debian/arsse.postinst @@ -4,19 +4,17 @@ set -e . /usr/share/debconf/confmodule -# Settings for dbconfig-common -dbc_generate_include_owner=root:www-data -dbc_generate_include_perms=0640 -dbc_generate_include=php:/var/lib/arsse/dbconfig.inc -dbc_pgsql_createdb_encoding="UTF8' lc_collate='C" -dbc_mysql_createdb_encoding="UTF8" -dbc_dbfile_owner=root:www-data -dbc_dbfile_perms=0660 - -# Do dbconfig-common installation stuff +# Set up dbconfig-common if test -f /usr/share/dbconfig-common/dpkg/postinst; then - . /usr/share/dbconfig-common/dpkg/postinst - dbc_go arsse "$@" + . /usr/share/dbconfig-common/dpkg/postinst + dbc_generate_include_owner="root:www-data" + dbc_generate_include_perms="0640" + dbc_generate_include="php:/var/lib/arsse/dbconfig.inc" + dbc_pgsql_createdb_encoding="UTF8' lc_collate='C" + dbc_mysql_createdb_encoding="UTF8" + dbc_dbfile_owner="root:www-data" + dbc_dbfile_perms="0660" + dbc_go arsse "$@" fi # dh_installdeb will replace this with shell code automatically diff --git a/dist/debian/arsse.postrm b/dist/debian/arsse.postrm index ad4a1874..f9c525b3 100644 --- a/dist/debian/arsse.postrm +++ b/dist/debian/arsse.postrm @@ -3,13 +3,13 @@ set -e if test -f /usr/share/debconf/confmodule; then - . /usr/share/debconf/confmodule + . /usr/share/debconf/confmodule fi -# Do dbconfig-common removal stuff +# Set up dbconfig-common if test -f /usr/share/dbconfig-common/dpkg/postrm; then - . /usr/share/dbconfig-common/dpkg/postrm - dbc_go arsse "$@" + . /usr/share/dbconfig-common/dpkg/postrm + dbc_go arsse "$@" fi # dh_installdeb will replace this with shell code automatically diff --git a/dist/debian/arsse.prerm b/dist/debian/arsse.prerm index 67f60a4c..c0cc81d7 100644 --- a/dist/debian/arsse.prerm +++ b/dist/debian/arsse.prerm @@ -4,7 +4,7 @@ set -e . /usr/share/debconf/confmodule -# Do dbconfig-common prerm stuff +# Set up dbconfig-common . /usr/share/dbconfig-common/dpkg/prerm dbc_go arsse "$@" diff --git a/dist/debian/lintian-overrides b/dist/debian/lintian-overrides index 3e67ae32..1847d9af 100644 --- a/dist/debian/lintian-overrides +++ b/dist/debian/lintian-overrides @@ -2,3 +2,5 @@ spelling-error-in-description Tiny Tiny (duplicate word) Tiny # The manual for DrUUID (a dependency) includes a harmless "up" link privacy-breach-generic usr/share/arsse/vendor/jkingweb/druuid/documentation/manual.html [] (http://jkingweb.ca/code/) +# We only ask dbconfig-common questions, which don't seem to require templates +no-debconf-templates diff --git a/dist/init.sh b/dist/init.sh index 5f6af71a..85e28c88 100644 --- a/dist/init.sh +++ b/dist/init.sh @@ -41,8 +41,8 @@ case "$1" in start) log_daemon_msg "Starting $DESC" "$NAME" if pidofproc -p $PIDFILE "$DAEMON" > /dev/null 2>&1 ; then - return 1 - fi + return 1 + fi arsse_start ;; stop)